You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the rollup-plugin-mjs-entry approach (which is also the official Node.js suggested approach) doesn't actually work well with other tools outside the Node.js ecosystem.
What does work is simply producing a plain CJS build for legacy Node.js setups, and then producing a separate MJS build for the rest of the world. This gets rid of all the confusion.
I will try to get a coworker to review the PR, but if you want to take a look and maybe try it out, that would be fine too.
If you try to use the built index.mjs file from the lib it will not work.
The reason is that it tries to import the default from index.js
A simple solution is adding at the end of the file index.ts the following:
export default codec;
This problem is also related and causes to: storybookjs/storybook#22542
The text was updated successfully, but these errors were encountered: