Skip to content

Commit 334e8a5

Browse files
authored
Add mjs and cjs to resolver extensions (#8667)
Not totally sure about the order we should use, but seems good to prioritize mjs.
1 parent ae31c3c commit 334e8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/resolvers/default/src/DefaultResolver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default (new Resolver({
2222
extensions:
2323
dependency.specifierType === 'commonjs' ||
2424
dependency.specifierType === 'esm'
25-
? ['ts', 'tsx', 'js', 'jsx', 'json']
25+
? ['ts', 'tsx', 'mjs', 'js', 'jsx', 'cjs', 'json']
2626
: [],
2727
mainFields: ['source', 'browser', 'module', 'main'],
2828
packageManager: options.packageManager,

0 commit comments

Comments
 (0)