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 1770cd0 commit 8f67069Copy full SHA for 8f67069
lib/internal/modules/esm/get_format.js
@@ -92,7 +92,7 @@ function detectModuleFormat(source, url) {
92
return containsModuleSyntax(source, fileURLToPath(url), url) ? 'module' : 'commonjs';
93
} catch {
94
// containsModuleSyntax throws if source is undefined and the passed filename cannot be read
95
- return 'commonjs';
+ // Return undefined so that the load hook can determine the format
96
}
97
98
0 commit comments