We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"type": "module"
package.json
Use .mjs extension for ES Modules
Additional information:
The text was updated successfully, but these errors were encountered:
https://dev.to/mikeal_2/native-esm-in-node-js-w-require-fallbacks-and-support-for-all-front-end-compilers-2ded https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1 sindresorhus/project-ideas#116 webpack/webpack#4674 (comment) https://github.com/multiformats/js-multiformats/blob/master/package.json https://nodejs.org/api/packages.html#packages_package_entry_points https://nodejs.org/api/packages.html#packages_dual_commonjs_es_module_packages https://medium.com/@WebReflection/a-nodejs-dual-module-deep-dive-8f94ff56210e https://twitter.com/webreflection/status/1235537753690890240?s=12 https://2ality.com/2019/10/hybrid-npm-packages.html
cjs and esm folder, type field
--experimental-modules
{ "type": "module", "main": "./index.cjs.js", "module": "./index.esm.js", "exports": { ".": { "import": "./index.esm.js", "require": "./index.cjs.js", "browser": "./index.browser.esm.js", "default": "./index.cjs.js", }, "./throttle.js": { "import": "./throttle.esm.js", "require": "./throttle.cjs.js", "browser": "./throttle.browser.esm.js", "default": "./throttle.cjs.js", }, "./debounce.js": { "import": "./debounce.esm.js", "require": "./debounce.cjs.js", "browser": "./debounce.browser.esm.js", "default": "./debounce.cjs.js", } }, "browser": { "./index.esm.js": "./index.browser.esm.js", "./throttle.esm.js": "./throttle.browser.esm.js", "./debounce.esm.js": "./debounce.browser.esm.js" } }
Sorry, something went wrong.
dcbcd69
niksy
No branches or pull requests
"type": "module"
inpackage.json
nodejs/node@b1094dbUse .mjs extension for ES Modules
Additional information:
The text was updated successfully, but these errors were encountered: