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 6e3ed67 commit 519235bCopy full SHA for 519235b
lib/internal/modules/cjs/loader.js
@@ -1934,7 +1934,7 @@ Module._extensions['.js'] = function(module, filename) {
1934
} else if (path.extname(filename) === '') {
1935
// Extensionless files skip the .js suffix check above. When type is commonjs,
1936
// follow it so ESM syntax surfaces as SyntaxError instead of silently
1937
- // delegating to ESM. For type: module, leave format undefined so V8's syntax
+ // delegating to ESM. For type: module, leave format undefined so our syntax
1938
// detection handles it (allowing CJS extensionless files in ESM packages).
1939
pkg = packageJsonReader.getNearestParentPackageJSON(filename);
1940
const typeFromPjson = pkg?.data?.type;
0 commit comments