Browse Source

KERNEL-4727 refactor: 【平台】使用babel-preset-fineui插件配置babel

research/10.0
zsmj1994 4 years ago
parent
commit
9a82045c0c
  1. 2
      .npmrc
  2. 30
      babel.config.js
  3. 3
      package.json

2
.npmrc

@ -0,0 +1,2 @@
puppeteer_download_host=https://npm.taobao.org/mirrors
@fui:registry=https://npm.fineres.com/

30
babel.config.js

@ -1,29 +1,3 @@
module.exports = function(api) { module.exports = function (api) {
api.cache(true); return require("@fui/babel-preset-fineui").configs.base(api)
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',
];
return {
presets,
plugins,
};
}; };

3
package.json

@ -57,8 +57,7 @@
"webpack-cli": "3.3.5", "webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2", "webpack-dev-server": "3.7.2",
"webpack-merge": "4.2.1", "webpack-merge": "4.2.1",
"ydoc": "4.1.0", "@fui/babel-preset-fineui": "^1.0.0"
"ydoc-plugin-jsdoc": "0.0.3"
}, },
"optionalDependencies": { "optionalDependencies": {
"fineui": "git+ssh://git@cloud.finedevelop.com:7999/visual/fineui.git", "fineui": "git+ssh://git@cloud.finedevelop.com:7999/visual/fineui.git",

Loading…
Cancel
Save