瀏覽代碼

update build setup to make babel work properly with flow

Evan You 10 年之前
父節點
當前提交
623bcc632c
共有 2 個文件被更改,包括 3 次插入8 次删除
  1. 2 6
      .babelrc
  2. 1 2
      package.json

+ 2 - 6
.babelrc

@@ -1,16 +1,12 @@
 {
   "env": {
     "development": {
-      "presets": ["es2015"]
+      "presets": ["es2015", "flow-vue"]
     },
     "production": {
-      "presets": ["es2015-rollup-vue"]
+      "presets": ["es2015-rollup-vue", "flow-vue"]
     }
   },
-  "plugins": [
-    "syntax-flow",
-    "transform-flow-strip-types"
-  ],
   "ignore": [
     "dist/*.js"
   ]

+ 1 - 2
package.json

@@ -40,10 +40,9 @@
     "babel-core": "6.8.x",
     "babel-eslint": "^6.0.4",
     "babel-loader": "6.2.x",
-    "babel-plugin-syntax-flow": "^6.8.0",
-    "babel-plugin-transform-flow-strip-types": "^6.8.0",
     "babel-preset-es2015": "6.6.x",
     "babel-preset-es2015-rollup-vue": "1.1.x",
+    "babel-preset-flow-vue": "^1.0.0",
     "chromedriver": "2.21.x",
     "cross-spawn": "2.2.x",
     "entities": "1.1.x",