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
Masquerading as ESM error should be fixed in the package exports in the target library, the problem is about dual CJS/ESM package exports with default exports, the generated cjs module should use exports.default instead module.exports for the default export.
Describe the feature
Default exports are not correctly exported from CJS files
When creating a package using
unbuild
CJS exports cause Masquerading as ESM error (example from my lib)Several libraries need to run a post-build script to change the source of
.cjs
filesAffected libs:
other can be found too: https://github.com/search?q=patchCjs&type=code
Is it possible to fix this behavior within the library?
Huge thanks to @userquin for helping to figure it out
And thanks for awesome tool )
Additional information
The text was updated successfully, but these errors were encountered: