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

fix: remove 'module' entry from package.json #187

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Conversation

padamstx
Copy link
Member

A recent change to the library introduced
a separate es6 module for the library to support
tree shaking. Unfortunately, if an SDK project
doesn't (at a minimum) define the 'main' entry point
in its package.json file, then a problem can occur
due to an es5 vs es6 incompatibility.
This commit provides a tactical fix for this issue
by removing the 'module' entry point from the library's
package.json. This will prevent webpack from being
able to minimize the resulting application code, but
it will avoid the problem.

Once we have a strategy for rolling out "tree
shakability" in various SDK projects, we can
re-introduce the 'module' entry point.

Checklist
  • npm test passes (tip: npm run lint-fix can correct most style issues)
  • tests are included
  • documentation is changed or added

A recent change to the library introduced
a separate es6 module for the library to support
tree shaking.  Unfortunately, if an SDK project
doesn't (at a minimum) define the 'main' entry point
in its package.json file, then a problem can occur
due to an es5 vs es6 incompatibility.
This commit provides a tactical fix for this issue
by removing the 'module' entry point from the library's
package.json.  This will prevent webpack from being
able to minimize the resulting application code, but
it will avoid the problem.

Once we have a strategy for rolling out "tree
shakability" in various SDK projects, we can
re-introduce the 'module' entry point.
@padamstx padamstx self-assigned this Jan 14, 2022
Copy link
Member

@dpopp07 dpopp07 left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@padamstx padamstx merged commit 3a0aea5 into main Jan 14, 2022
@padamstx padamstx deleted the remove-module branch January 14, 2022 20:22
ibm-devx-sdk pushed a commit that referenced this pull request Jan 14, 2022
## [2.17.7](v2.17.6...v2.17.7) (2022-01-14)

### Bug Fixes

* remove 'module' entry from package.json ([#187](#187)) ([3a0aea5](3a0aea5))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 2.17.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants