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

chore: fix a typo in module field in package.json #11

Merged
merged 1 commit into from May 24, 2019

Conversation

alirezamirian
Copy link
Contributor

Fixes webpack build problem

@alirezamirian
Copy link
Contributor Author

Also note that module in package.json should point to an entry file which uses ESM, but should not use other non ES5 features like class. This causes problems when building with popular build tools like webpack. I suggest removing the module entry in package.json altogether, or transpile it to ES5.

More info:

webpack/webpack#1979 (comment)

and also from webpack docs:

The module property should point to a script that utilizes ES2015 module syntax but no other syntax features that aren't yet supported by browsers or node. This enables webpack to parse the module syntax itself, allowing for lighter bundles via tree shaking if users are only consuming certain parts of the library.

@ilyashubin ilyashubin merged commit 617b4fb into ilyashubin:master May 24, 2019
@ilyashubin
Copy link
Owner

Thanks! I will remove module in the next version 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants