diff --git a/babel.config.ie8.js b/babel.config.ie8.js index 0202dba49..6cf5fffe7 100644 --- a/babel.config.ie8.js +++ b/babel.config.ie8.js @@ -1,34 +1 @@ -module.exports = function (api) { - api.cache(true); - const presets = [ - [ - "@babel/preset-env", - { - targets: { - ie: 8, - }, - }, - ], - "@babel/preset-typescript", - ]; - const plugins = [ - [ - "@babel/plugin-proposal-decorators", - { - legacy: true, - }, - ], - "@babel/plugin-proposal-class-properties", - "@babel/plugin-transform-block-scoping", - ["@babel/plugin-transform-classes", { - loose: true, - }], - "@babel/plugin-transform-proto-to-assign", - "@babel/plugin-transform-modules-commonjs", - ]; - - return { - presets, - plugins, - }; -}; +module.exports = require('@fui/babel-preset-fineui').configs.ie8; diff --git a/babel.config.js b/babel.config.js index c16ff0231..12cd09e66 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,34 +1 @@ -module.exports = function (api) { - api.cache(true); - const presets = [ - [ - "@babel/preset-env", - { - targets: { - ie: 9, - chrome: 47, - }, - }, - ], - "@babel/preset-typescript", - ]; - const plugins = [ - [ - "@babel/plugin-proposal-decorators", - { - legacy: true, - }, - ], - "@babel/plugin-proposal-class-properties", - "@babel/plugin-transform-block-scoping", - ["@babel/plugin-transform-classes", { - loose: true, - }], - "@babel/plugin-transform-proto-to-assign", - ]; - - return { - presets, - plugins, - }; -}; +module.exports = require('@fui/babel-preset-fineui').configs.base; diff --git a/package.json b/package.json index b8cff3662..60f222663 100644 --- a/package.json +++ b/package.json @@ -6,16 +6,7 @@ "types": "dist/lib/index.d.ts", "dependencies": {}, "devDependencies": { - "@babel/core": "7.4.5", - "@babel/plugin-proposal-class-properties": "7.5.0", - "@babel/plugin-proposal-decorators": "7.4.4", - "@babel/plugin-transform-block-scoping": "7.5.5", - "@babel/plugin-transform-classes": "7.5.5", - "@babel/plugin-transform-modules-commonjs": "7.6.0", - "@babel/plugin-transform-proto-to-assign": "7.5.5", - "@babel/polyfill": "7.6.0", - "@babel/preset-env": "7.4.5", - "@babel/preset-typescript": "7.3.3", + "@fui/babel-preset-fineui": "^1.0.0", "@fui/eslint-plugin": "1.0.7", "@typescript-eslint/eslint-plugin": "1.11.0", "@typescript-eslint/parser": "1.11.0",