Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix jest.config.scripts.js to resolve subpath export for `@metamask…
…/utils` with `cjs` extension
  • Loading branch information
MajorLift committed Jul 11, 2024
commit 720e20a8414fbd458fd0f1074afa16b8c5e92670
4 changes: 2 additions & 2 deletions jest.config.scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ module.exports = {
},

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// This ensures that Babel can resolve ESM exports correctly.
// This ensures that Babel can resolve subpath exports correctly.
moduleNameMapper: {
'^@metamask/utils/(.+)$': [
'<rootDir>/node_modules/@metamask/utils/dist/$1.js',
'<rootDir>/node_modules/@metamask/utils/dist/$1.cjs',
],
},

Expand Down