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

Custom chunk folder #888

Closed
claviska opened this issue Feb 25, 2021 · 1 comment
Closed

Custom chunk folder #888

claviska opened this issue Feb 25, 2021 · 1 comment

Comments

@claviska
Copy link

This is somewhat similar to #553 but specifically for chunks. Currently, they all get dumped in the root, which is a bit messy and confusing.

As a user, I don't really want to configure an output dir/filename for all files. I'm actually very happy with esbuild mimicking my existing directory structure. But those chunk files...In my case, each component has its own entry point and I end up with ~50 chunks in the root. 😆

I'd love to have an option that let's me define a simple path or even a string-based. Rollup does this quite intuitively with chunkFileNames:

{
  // ...
  chunkFileNames: '[name]-[hash].js'
}

But again, even achunkDirectory option would be amazing. ✨

Aside: thanks for your incredible work on esbuild! 🙌

@evanw
Copy link
Owner

evanw commented Feb 25, 2021

This is actually already in the works. It's one of the features from the upcoming rewrite of the linker, with which I am planning to support this feature as well as code splitting for all formats, top-level await, manual chunk names, custom chunk transform plugins, accurate import order, and probably some other stuff. But that has been taking a while because the combination of all of those features gets really complicated. I could potentially pull out some of these features and land them into master now though.

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

Successfully merging a pull request may close this issue.

2 participants