-
Notifications
You must be signed in to change notification settings - Fork 227
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
feat(infrastructure): default npm entry point to ES5 #108
Conversation
Codecov Report
@@ Coverage Diff @@
## master #108 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 18 18
Lines 637 637
Branches 53 53
=======================================
Hits 631 631
Misses 6 6 Continue to review full report at Codecov.
|
@@ -3,6 +3,7 @@ | |||
"version": "0.2.0", | |||
"description": "Material Components React Button", | |||
"license": "Apache-2.0", | |||
"main": "dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better as another pr: if you still want an esm build like Dan mentioned, you could run Babel with ["env", { "modules": false" }]
into a new dist type folder and add the module
field like with main so it just doesn't touch the import/exports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hzoo I just pushed some changes that doesn't touch the import/exports by adding the {modules: false} options. I think its working correctly as I'm now seeing lines like this:
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Discussed offline: renamed <package_name>.map.js --> index.map.js and created .es.js files as part of dist directory. |
fixes #107 #100