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

Support for ESM. Modules are not concatenated #507

Closed
o-alexandrov opened this issue Aug 13, 2020 · 2 comments
Closed

Support for ESM. Modules are not concatenated #507

o-alexandrov opened this issue Aug 13, 2020 · 2 comments

Comments

@o-alexandrov
Copy link

o-alexandrov commented Aug 13, 2020

Is your feature request related to a problem? Please describe.

The wrapper ESM approach doesn't produce the most optimal bundles.

Describe the solution you'd like

It'd be better, if this pkg was built using rollup for the most efficient builds for every environment.

  • shipped with built-in TypeScript & written using latest ES

Additional context

In the following example, uuid is "annoyingly" a single module that is not concatenated by webpack.

@ctavan
Copy link
Member

ctavan commented Aug 13, 2020

How exactly are you building your bundle? This package is built in a way that webpack and rollup should pick up optimized ESM builds that allow for tree-shaking.

Could you provide a minimal reproducible example for how you got to the bundle shown above?

Also the module is written in ESModule syntax for precisely the reasons of tree-shakeability and we don't include the TypeScript types on purpose, see #368 (comment).

@o-alexandrov
Copy link
Author

oups, I apologize, it was improper dependencies hoisting, that uuid on the graph above is 3.4.0

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