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

Publish commonjs/esmodules and allow tree shaking #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

christianpv
Copy link

@christianpv christianpv commented Apr 6, 2020

  • Updated npm run build to create a es(esmodule)/lib(commonjs) directory by using babel.
  • Updated main/module properties in package.json to point to lib/es index.js.
  • Added sideEffects with value of false to package.json to allow webpack to tree shake the library.
  • Updated the list of npm files that gets published to include es/lib.
  • Deleted dist/module as we are using common "es" directory to publish module.
  • Added es/lib to .gitignore since these directories only need to get published on npm.

@@ -25,8 +25,6 @@ $ npm install

# Run scripts to verify installation
$ npm test
$ npm run-script lint
$ npm run-script cover
Copy link
Author

@christianpv christianpv Apr 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm test runs the lint command. There is not cover command.

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.

1 participant