-
Notifications
You must be signed in to change notification settings - Fork 17
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: output umd build for main key #19
Conversation
When we paired it was consciously decided that umd isn't useful to us anymore. Is satisfying what a |
We could omit the |
Something to look forward to is Node's experimental support for a It looks like producing UMD output is fairly easy to do with command line overrides to |
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.
I don’t have strong opinions against this. Feel free to carry on. Not sure why the tests are failing though.
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.
This looks good to me 🎇
test/karma.config.js
Outdated
}, | ||
'test.js' | ||
], | ||
files: ['bootstrap.js', '../dist/umd/index.js', 'test.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.
bootstrap.js
seems like an over-complication in comparison to loading the native module. Can we keep the test using the module output here?
I did not notice in #15 but that PR ended up producing a build that only included ES modules.
The
main
key in a package.json should not be used for files that produce es modules. We should instead produce aumd
compatible bundle, and linkmain
to that.This PR changes the
build
step to produce bothusm
andes
style modules, and changes themain
key to point to theumd
build.