sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

Rename dist/esm/index.js to dist/esm/index.mjs?

Open pomber opened this issue 3 years ago • 0 comments

I think some bundlers (and node) need the esm files to have the .mjs extension (or type="module" in package.json). Otherwise, they treat the esm file as commonjs. I'm currently having this issue with nextjs.

I'll try to provide a reproduction repo if needed.

pomber avatar Apr 19 '22 14:04 pomber