Skip to content

Commit

Permalink
Include moduleNameMapper for .js imports in example ESM configs
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Sep 25, 2021
1 parent 63c5694 commit f483b49
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions website/versioned_docs/version-27.0/guides/esm-support.md
Expand Up @@ -23,6 +23,9 @@ module.exports = {
useESM: true,
},
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
}
```

Expand All @@ -36,6 +39,9 @@ module.exports = {
"ts-jest": {
"useESM": true
}
},
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.js$": "$1"
}
}
}
Expand All @@ -53,6 +59,9 @@ module.exports = {
useESM: true,
},
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
}
```

Expand All @@ -66,6 +75,9 @@ module.exports = {
"ts-jest": {
"useESM": true
}
},
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.js$": "$1"
}
}
}
Expand Down

0 comments on commit f483b49

Please sign in to comment.