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
{{ message }}
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
This is the error I get when trying to import applyObjParamsToScript from @meshsdk/mesh-csl:
(node:127061) Warning: To load an ES module, set"type": "module"in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/dominicc/Development/serpentine/node_modules/.pnpm/@[email protected]/node_modules/@meshsdk/mesh-csl/dist/mjs/index.js:1
export* from './csl';
The current hybrid module support can't work because both the CJS and ESM modules import external modules with .js suffixes, yet additional imports with .js suffixes can only be either CJS ("type": "commonjs") or ESM ("type": "module").
The most common way I see people doing hybrid modules is to bundle the CJS export down to a single file and set "type": "module" within package.json so that the ESM can be left unbundled (and potentially able to support tree shaking?).
Alternatively, you could:
Bundle the ESM export.
Find some tooling which will rename all the .js files used within dist/mjs to have .mjs extensions and set "type": "commonjs", in which case both export types can be left unbundled.
Thanks for making this library BTW 🙏
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is the error I get when trying to import
applyObjParamsToScript
from@meshsdk/mesh-csl
:The current hybrid module support can't work because both the CJS and ESM modules import external modules with
.js
suffixes, yet additional imports with.js
suffixes can only be either CJS ("type": "commonjs"
) or ESM ("type": "module"
).The most common way I see people doing hybrid modules is to bundle the CJS export down to a single file and set
"type": "module"
withinpackage.json
so that the ESM can be left unbundled (and potentially able to support tree shaking?).Alternatively, you could:
.js
files used withindist/mjs
to have.mjs
extensions and set"type": "commonjs"
, in which case both export types can be left unbundled.Thanks for making this library BTW 🙏
The text was updated successfully, but these errors were encountered: