Skip to content

Commit

Permalink
Add mjs and cjs to resolver extensions (#8667)
Browse files Browse the repository at this point in the history
Not totally sure about the order we should use, but seems good to prioritize mjs.
  • Loading branch information
devongovett committed Dec 6, 2022
1 parent ae31c3c commit 334e8a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/resolvers/default/src/DefaultResolver.js
Expand Up @@ -22,7 +22,7 @@ export default (new Resolver({
extensions:
dependency.specifierType === 'commonjs' ||
dependency.specifierType === 'esm'
? ['ts', 'tsx', 'js', 'jsx', 'json']
? ['ts', 'tsx', 'mjs', 'js', 'jsx', 'cjs', 'json']
: [],
mainFields: ['source', 'browser', 'module', 'main'],
packageManager: options.packageManager,
Expand Down

0 comments on commit 334e8a5

Please sign in to comment.