From 5762ab9e669ff109d3898814ad66e64783b4db6b Mon Sep 17 00:00:00 2001 From: butlerx Date: Fri, 20 Dec 2019 11:20:24 +0000 Subject: [PATCH] fix compilation errors --- .babelrc | 9 ++------- package.json | 1 + webpack.config.babel.js | 2 +- yarn.lock | 8 ++++++++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.babelrc b/.babelrc index 6e53860..05a655e 100644 --- a/.babelrc +++ b/.babelrc @@ -1,10 +1,5 @@ { - "presets": [ - "@babel/preset-typescript", - ["@babel/env"] - ], + "presets": ["@babel/preset-typescript", ["@babel/env"]], "compact": true, - "plugins": [ - "lodash" - ] + "plugins": ["lodash", "@babel/plugin-proposal-class-properties"] } diff --git a/package.json b/package.json index df58ff6..3abdd69 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "devDependencies": { "@babel/core": "^7.5.5", "@babel/node": "^7.5.5", + "@babel/plugin-proposal-class-properties": "^7.7.4", "@babel/preset-env": "^7.5.5", "@babel/preset-typescript": "^7.3.3", "@babel/register": "^7.5.5", diff --git a/webpack.config.babel.js b/webpack.config.babel.js index b3afae9..d9127bc 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -94,7 +94,7 @@ export default [ }, ], ], - plugins: ['lodash'], + plugins: ['lodash', '@babel/plugin-proposal-class-properties'], }, }, }, diff --git a/yarn.lock b/yarn.lock index b85f984..ca91da1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -259,6 +259,14 @@ "@babel/helper-remap-async-to-generator" "^7.7.4" "@babel/plugin-syntax-async-generators" "^7.7.4" +"@babel/plugin-proposal-class-properties@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.4.tgz#2f964f0cb18b948450362742e33e15211e77c2ba" + integrity sha512-EcuXeV4Hv1X3+Q1TsuOmyyxeTRiSqurGJ26+I/FW1WbymmRRapVORm6x1Zl3iDIHyRxEs+VXWp6qnlcfcJSbbw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.7.4" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-dynamic-import@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.4.tgz#dde64a7f127691758cbfed6cf70de0fa5879d52d"