We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6bb2ad commit 4b3b0e3Copy full SHA for 4b3b0e3
doc/api/esm.md
@@ -689,6 +689,12 @@ CommonJS entry point for `require`.
689
}
690
```
691
692
+The above example uses explicit extensions `.mjs` and `.cjs`.
693
+If your files use the `.js` extension, `"type": "module"` will cause such files
694
+to be treated as ES modules, just as `"type": "commonjs"` would cause them
695
+to be treated as CommonJS.
696
+See [Enabling](#esm_enabling).
697
+
698
```js
699
// ./node_modules/pkg/index.cjs
700
exports.name = 'value';
0 commit comments