Skip to content

Commit

Permalink
Misc CJS vs ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 3, 2021
1 parent 22e8981 commit dfdfeea
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Expand Up @@ -50,6 +50,7 @@ module.exports = {
"<rootDir>/build/",
],
resolver: supportsESM ? "./test/jestExportsMapResolver.cjs" : null,
extensionsToTreatAsEsm: supportsESM ? [".ts"] : null,
// We don't need module name mappers here as depedencies of workspace
// package should be declared explicitly in the package.json
// Yarn will generate correct file links so that Jest can resolve correctly
Expand Down
@@ -1,3 +1,4 @@
{
"type": "module",
"browserslist": "chrome 4"
}
@@ -1,3 +1,3 @@
{
"plugins": ["transform-typescript", "./plugin"]
"plugins": ["transform-typescript", "./plugin.cjs"]
}
Expand Up @@ -7,6 +7,6 @@
"legacy": true
}
],
"./plugin"
"./plugin.cjs"
]
}

0 comments on commit dfdfeea

Please sign in to comment.