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

get list of imported chunks for each entrypoint #225

Closed
nitsky opened this issue Jul 5, 2020 · 2 comments
Closed

get list of imported chunks for each entrypoint #225

nitsky opened this issue Jul 5, 2020 · 2 comments

Comments

@nitsky
Copy link
Contributor

nitsky commented Jul 5, 2020

The initial load of a web app can be sped up by preloading all javascript chunks it needs using <link> tags. This could be done with the esbuild JS or Go API like it is done with Rollup, where each output chunk has imports and dynamicImports keys specifying paths to the corresponding output files. Rollup's CLI doesn't currently support outputting this information, but perhaps esbuild could optionally emit a manifest file with metadata on all emitted entrypoints, chunks, and assets.

Below is a link to the relevant Rollup docs section:

http://rollupjs.org/guide/en/#rolluprollup

@evanw
Copy link
Owner

evanw commented Jul 8, 2020

Thanks for logging this. I agree that this would be good to do.

There actually already is a way to emit a metadata file (the --metafile flag) but it probably doesn't yet output all of the information it needs to for code splitting.

@evanw evanw closed this as completed in 7ef0d5e Jul 11, 2020
@evanw
Copy link
Owner

evanw commented Jul 11, 2020

This information has been added to the metafile output starting in version 0.6.0. See the release notes for more information.

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

2 participants