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
With the esm output it seems I can easily achieve this with the code splitting automatically deduping common code between the entries.
Currently though it's not possible to use format: "cjs" with splitting enabled. It would be great if this was possible because then it would allow me to use esbuild for these modules which require backward compat via providing cjs and esm builds.
If I run esbuild again on the output from the esm build with format: "cjs" it basically does what I want, however it re-inlines all of the runtime stuff again which isn't ideal.
The text was updated successfully, but these errors were encountered:
I'm playing around with using esbuild for bundling library code with a setup like the following:
The problem is many libraries I work on require exposing multiple "entry point" files to the user. Think stuff like:
With the
esm
output it seems I can easily achieve this with the code splitting automatically deduping common code between the entries.Currently though it's not possible to use
format: "cjs"
withsplitting
enabled. It would be great if this was possible because then it would allow me to use esbuild for these modules which require backward compat via providing cjs and esm builds.If I run
esbuild
again on the output from theesm
build withformat: "cjs"
it basically does what I want, however it re-inlines all of the runtime stuff again which isn't ideal.The text was updated successfully, but these errors were encountered: