From 9e5bbe7ae90965357a7a90f367de87d9f198a5c4 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 23 Oct 2017 22:44:18 +0800 Subject: [PATCH] use babel-plugin-env --- .roadhogrc | 2 ++ package.json | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.roadhogrc b/.roadhogrc index a125ae97..3a08204b 100755 --- a/.roadhogrc +++ b/.roadhogrc @@ -6,6 +6,7 @@ "dva-hmr", "transform-runtime", "transform-decorators-legacy", + "transform-class-properties", ["import", { "libraryName": "antd", "style": true }] ] }, @@ -13,6 +14,7 @@ "extraBabelPlugins": [ "transform-runtime", "transform-decorators-legacy", + "transform-class-properties", ["import", { "libraryName": "antd", "style": true }] ] } diff --git a/package.json b/package.json index f07a804b..81d8f5ed 100755 --- a/package.json +++ b/package.json @@ -32,8 +32,11 @@ "babel-jest": "^21.0.0", "babel-plugin-dva-hmr": "^0.3.2", "babel-plugin-import": "^1.2.1", + "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-runtime": "^6.9.0", + "babel-preset-env": "^1.6.1", + "babel-preset-react": "^6.24.1", "babel-runtime": "^6.9.2", "cross-port-killer": "^1.0.1", "enzyme": "^3.1.0", @@ -60,12 +63,12 @@ }, "babel": { "presets": [ - "es2015", - "stage-0", + "env", "react" ], "plugins": [ - "transform-decorators-legacy" + "transform-decorators-legacy", + "transform-class-properties" ] }, "jest": { -- GitLab