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 985a3c7 commit 30b91f7Copy full SHA for 30b91f7
commonjs-extension-resolution-loader/README.md
@@ -0,0 +1,16 @@
1
+Node's ESM specifier resolution does not support all default behavior of
2
+the CommonJS loader. One of the behavior differences is automatic resolution
3
+of file extensions and the ability to import directories that have an index
4
+file.
5
+
6
+Use this loader to enable automatic extension resolution and importing from
7
+directories that include an index file.
8
9
+```console
10
+$ node index.mjs
11
+success!
12
+$ node index # Failure!
13
+Error: Cannot find module
14
+$ node --loader=./loader.js index
15
16
+```
0 commit comments