Browse Source

Pull request #1401: KERNEL-4752 refactor:使用babel-preset-fineui配置babel

Merge in VISUAL/fineui from ~GUYI/fineui:master to master

* commit '91cc4d778d50fc42d49a4aa8a94ffac72ffd6e4d':
  KERNEL-4752 refactor:使用babel-preset-fineui配置babel
es6
windy 5 years ago
parent
commit
3909135ca3
  1. 35
      babel.config.ie8.js
  2. 35
      babel.config.js
  3. 11
      package.json

35
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;

35
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;

11
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",

Loading…
Cancel
Save