ソースを参照

10 09 babel链式配置

mo 4 年 前
コミット
01a7b62c90
2 ファイル変更4 行追加0 行削除
  1. 3 0
      babel.config.js
  2. 1 0
      package.json

+ 3 - 0
babel.config.js

@@ -1,5 +1,8 @@
 module.exports = {
 module.exports = {
   presets: [
   presets: [
     '@vue/app'
     '@vue/app'
+  ],
+  plugins: [
+    "@babel/plugin-proposal-optional-chaining"
   ]
   ]
 }
 }

+ 1 - 0
package.json

@@ -44,6 +44,7 @@
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@babel/core": "7.0.0",
     "@babel/core": "7.0.0",
+    "@babel/plugin-proposal-optional-chaining": "^7.11.0",
     "@babel/register": "7.0.0",
     "@babel/register": "7.0.0",
     "@vue/cli-plugin-babel": "3.6.0",
     "@vue/cli-plugin-babel": "3.6.0",
     "@vue/cli-plugin-eslint": "^3.9.1",
     "@vue/cli-plugin-eslint": "^3.9.1",