Browse Source

下次这个babelrc文件不要乱删,有用的

fangxiao 6 years ago
parent
commit
6b65c3452b
2 changed files with 16 additions and 1 deletions
  1. 13 0
      .babelrc
  2. 3 1
      package.json

+ 13 - 0
.babelrc

@@ -0,0 +1,13 @@
+{
+  "presets": [
+    ["es2015", { "modules": false }],
+    "stage-2"
+  ],
+  "plugins": ["transform-runtime"],
+  "comments": false,
+  "env": {
+    "test": {
+      "plugins": [ "istanbul" ]
+    }
+  }
+}

+ 3 - 1
package.json

@@ -10,6 +10,7 @@
     "build": "node build/build.js"
   },
   "dependencies": {
+    
     "echarts": "^3.7.2",
     "element-ui": "1.4.6",
     "vue": "2.3.3",
@@ -23,6 +24,7 @@
     "babel-loader": "7.1.1",
     "babel-plugin-transform-runtime": "6.22.0",
     "babel-preset-env": "1.3.2",
+    "babel-preset-es2015": "^6.24.1",
     "babel-preset-stage-2": "6.22.0",
     "babel-register": "6.22.0",
     "babel-runtime": "^6.26.0",
@@ -76,4 +78,4 @@
     "last 2 versions",
     "not ie <= 8"
   ]
-}
+}