2 Star 9 Fork 4

KubeSphere/console

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
babel.config.js 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
/*
* This file is part of KubeSphere Console.
* Copyright (C) 2019 The KubeSphere Console Authors.
*
* KubeSphere Console is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* KubeSphere Console is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with KubeSphere Console. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = {
presets: [
[
'@babel/preset-env',
{
corejs: '2',
useBuiltIns: 'entry',
targets: ['> 5%', 'ie 9'],
modules: 'commonjs',
exclude: ['proposal-dynamic-import'],
},
],
'@babel/preset-react',
],
plugins: [
'@babel/plugin-transform-runtime',
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
},
],
['@babel/plugin-proposal-class-properties', { loose: true }],
[
'transform-imports',
{
lodash: {
transform: 'lodash/${member}',
preventFullImport: true,
},
'components/Base': {
transform: 'components/Base/${member}',
preventFullImport: true,
},
'components/Inputs': {
transform: 'components/Inputs/${member}',
preventFullImport: true,
},
},
],
'recharts',
],
env: {
production: {
plugins: [
[
'transform-react-remove-prop-types',
{
removeImport: true,
ignoreFilenames: ['node_modules'],
},
],
],
},
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/kubesphere/console.git
[email protected]:kubesphere/console.git
kubesphere
console
console
master

搜索帮助