Repository navigation
Remove "type": "commonjs" from package.json - #556
Conversation
|
Brain dump for Greg: I recall that the current setup was a compromise between supporting some set of nodejs versions with different capabilities. We still have node 10 in our testing matrix, which we could drop now. We also don't seem to have any sorts of integration tests with common package managers or bundlers. That part is pretty manual testing, IIRC. |
|
Just checked with bundlers: Webpack 5, parcel, rollup, vite - working fine. I'm using yarn as package manager - that is working too. |
|
Node 10 has passed it's end-of-life, I don't think someone comfortable with using that old of a Node version would mind using an equally outdated version of a dependency |
gregtatum
left a comment
There was a problem hiding this comment.
Hah, forgot to hit approve on it before merging. Thanks for the fix!
|
👋 would it be possible to publish this in a package update? This is blocking usage for me atm. |
|
Thanks so much for this! |

Setting "type" field in package.json forces Webpack to treat all files in the package as either CommonJS or EcmaScript.
Without it Webpack correctly uses "main" and "module" fields.
Fixes #517