Open starpit opened 3 years ago
Due to the "type": "commonjs" in the package.json, webpack will assume that any .js file is in CommonJS module format. We can address this by instead using .mjs for ESModule build output. This is the standard extension, it seems [1].
"type": "commonjs"
.js
.mjs
Fixes #15
[1] https://stackoverflow.com/a/57492606/5270773
Thanks for this - I had to update some stuff and fix the naming of the cjs one, so I bundled it into the latest release. See if v4.1.0 works.
cjs
Due to the
"type": "commonjs"
in the package.json, webpack will assume that any.js
file is in CommonJS module format. We can address this by instead using.mjs
for ESModule build output. This is the standard extension, it seems [1].Fixes #15
[1] https://stackoverflow.com/a/57492606/5270773