Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I build a whole folder? #2645

Open
atshushi opened this issue Oct 29, 2022 · 2 comments
Open

How can I build a whole folder? #2645

atshushi opened this issue Oct 29, 2022 · 2 comments

Comments

@atshushi
Copy link

before build:

  src /
    pages/
      index.ts
    main.ts

after build:

  dir /
    pages /
      index.js
    main.js
@hyrious
Copy link

hyrious commented Oct 29, 2022

Maybe you're looking for the splitting feature.

If you want esbuild to preserve folder structure (preserveModules) #708, or manually control what files it will emit (manualChunks) #207, these are not supported yet.

@hinell
Copy link

hinell commented Nov 5, 2022

@atshushi Here an exmaple of config you can use. It will replicate your folder structure:

{
...
    entryPoints    : [
         "./src/ndex.ts"
        ,"./src/pages/index.ts"
        ,"./src/pages/pageA.ts"
    ],
    bundle         : false
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants