-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature] configurable chunks #268
Comments
There are a lot of ways people in the community have been customizing their code splitting, and I'm not sure that esbuild should support all of them. Right now I'm deliberately keeping things simple. Code splitting is still a work in progress (which is why #16 is still open) so if you have serious code splitting needs, esbuild is probably not a good fit at the moment.
Chunk names do not currently include a hash of the file contents, so they are not suitable for indefinite caching in the fine-grained way you are looking for. This will be implemented by the time the code splitting feature is complete.
This information is available in the optional JSON metadata file. You can generate it by passing the desired output path for the metadata using the |
This and #207 might be similar in terms of what it wants to achieve 🙂 |
Closing this in favor of #207. |
Would it be possible to configure what goes into the chunks and also the file name of each chunk?
Our current Webpack build generates a separate chunk for each package in node_modules. Also the file content hash is used in every chunk name for cache busting (including the main chunk). This lets us cache our assets indefinitely and browsers don't have to download all node modules when only a couple of them have changed.
To serve something like that, we'd need to populate index.html with script tags for each chunk needed by the entry point, but maybe the API can return that?
The text was updated successfully, but these errors were encountered: