You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple entrypoints that import from some set of library modules, and I would like to use splitting to spit out "optimal" chunks such that each entrypoint only ends up importing the subset of library modules it needs.
Here's an example with esbuild, where the result is not optimal; each entrypoint (main*.js) ends up importing all the library module code (Comp1 / Comp2), even though each only needs either Comp1 or Comp2.
This makes the biggest difference for packages like antd or react-aria, which has a "mono package" that imports and re-exports from many sub-packages (like the comps.js module in the example). It looks like it is important to avoid using mono-packages like this for now and to import directly from the sub-packages instead.
I have multiple entrypoints that import from some set of library modules, and I would like to use splitting to spit out "optimal" chunks such that each entrypoint only ends up importing the subset of library modules it needs.
Here's an example with esbuild, where the result is not optimal; each entrypoint (main*.js) ends up importing all the library module code (Comp1 / Comp2), even though each only needs either Comp1 or Comp2.
Rollup does split this more optimally; here's the rollup output.
Is it possible to achieve a result like rollup's with esbuild?
Thanks!
The text was updated successfully, but these errors were encountered: