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

3
package.json

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

Loading…
Cancel
Save