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

Question: Manually importing chunks server-side #3950

Open
mattparlane opened this issue Oct 24, 2024 · 0 comments
Open

Question: Manually importing chunks server-side #3950

mattparlane opened this issue Oct 24, 2024 · 0 comments

Comments

@mattparlane
Copy link

Sorry, this is a question, not a bug.

I am migrating an app from Webpack and I am using the webpackChunkName feature, which is not currently supported by esbuild. I am determined to make this work though because the improvement to my workflow is so enormous (thanks!).

esbuild is currently creating chunks that are not exactly aligned with what I want, because of the aforementioned lack of webpackChunkName support. To get around this, I am hoping to manually concatenate the relevant chunks server-side.

I will need to manually parse through the main chunk to find the chunk IDs (I can do this), but I am struggling with how to make the exports/imports work.

The chunks have this at the bottom:

export{fa as a,Kf as b,Jf as c,G2 as d,$1 as e,PC as f, [...]

and the main chunk has this:

import{Oa as ie,Sa as he,Ta as we, [...]} from"/[...]/chunk.TJ4BB7AT.js";

Question is: what modifications do I need to do so that I can manually put the split chunks at the top of the main chunk?

Thanks!

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

1 participant