-
Notifications
You must be signed in to change notification settings - Fork 20
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
🔧 Transpile to commonjs modules in addition to es2015 #46
Conversation
ftes
commented
Nov 26, 2020
- Allow usage in backend app without a webpack/babel setup
That wrench confused me for a second. I though it was some new github feature :-D There was already some effort in #26 regarding commonjs, but it did not receive any more feedback. |
I just love my emojis 😉 Regarding #26My solution can solve #26. But only if you specifically import from Regarding existing branch
|
Maybe we can reference both the esm build as well as the commonjs build in package.json. Also it would be great if you could add a small description in the readme. I know it is getting longer and longer all the time, but it is the main documentation of this library :-) |
I agree. "type": "module",
"main": "commonjs/index.js",
"module": "lib/index.js",
"exports": {
".": {
"require": "./commonjs/index.js",
"default": "./lib/index.js"
}
}, |
- Allow usage in backend app without a webpack/babel setup
16bc609
to
230ba18
Compare
I have update the PR (as mentioned in my previous comment). I have added a brief description to the readme. Here is a working example for both the |
Looks good! Thanks for the contribution. :) |