Skip to content

Commit

Permalink
npm: CJS files now require other files using using explicit extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Aug 30, 2020
1 parent c0b911d commit 9b65067
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .babelrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
"env": {
"cjs": {
"presets": [["@babel/preset-env", { "modules": "commonjs" }]],
"plugins": ["./resources/inline-invariant"]
"plugins": [
[
"./resources/add-extension-to-import-paths",
{ "extension": "js" }
],
"./resources/inline-invariant"
]
},
"mjs": {
"presets": [["@babel/preset-env", { "modules": false }]],
Expand Down

0 comments on commit 9b65067

Please sign in to comment.