Browse Source

Add babel replace-import-extension plugin

release-0.3.5
Fred Chasen 3 years ago
parent
commit
0a4f7f79b7
  1. 6
      babel.config.json
  2. 13
      package-lock.json
  3. 1
      package.json

6
babel.config.json

@ -1,4 +1,8 @@
{
"presets": ["@babel/env"],
"plugins": ["@babel/plugin-proposal-async-generator-functions", "@babel/plugin-transform-runtime"]
"plugins": [
"@babel/plugin-proposal-async-generator-functions",
"@babel/plugin-transform-runtime",
["replace-import-extension", { "extMapping": { ".js": ".cjs" }}]
]
}

13
package-lock.json generated

@ -24,6 +24,7 @@
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"babel-plugin-replace-import-extension": "^1.1.3",
"chalk": "^5.0.1",
"eslint": "^8.12.0",
"express": "^4.17.3",
@ -3242,6 +3243,12 @@
"@babel/core": "^7.0.0-0"
}
},
"node_modules/babel-plugin-replace-import-extension": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/babel-plugin-replace-import-extension/-/babel-plugin-replace-import-extension-1.1.3.tgz",
"integrity": "sha512-NmHOpGOLqSnZgefu/rmCviGIlp51WLGk8OY9CiQmp9qrpBy6jFVNvxIP4jR9WXZlNOPfBdGpuhPJe8upV4DTGw==",
"dev": true
},
"node_modules/babel-preset-current-node-syntax": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",
@ -12186,6 +12193,12 @@
"@babel/helper-define-polyfill-provider": "^0.3.1"
}
},
"babel-plugin-replace-import-extension": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/babel-plugin-replace-import-extension/-/babel-plugin-replace-import-extension-1.1.3.tgz",
"integrity": "sha512-NmHOpGOLqSnZgefu/rmCviGIlp51WLGk8OY9CiQmp9qrpBy6jFVNvxIP4jR9WXZlNOPfBdGpuhPJe8upV4DTGw==",
"dev": true
},
"babel-preset-current-node-syntax": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",

1
package.json

@ -31,6 +31,7 @@
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"babel-plugin-replace-import-extension": "^1.1.3",
"chalk": "^5.0.1",
"eslint": "^8.12.0",
"express": "^4.17.3",

Loading…
Cancel
Save