forgeplus-react/.babelrc

28 lines
911 B
Plaintext

{
"presets": [
// 移除 "es2015" 预设,因为它已经被 "env" 预设覆盖
["@babel/preset-env" ],
"@babel/preset-react" // 使用新的插件命名
],
"plugins": [
["import", { "libraryName": "antd", "libraryDirectory": "lib"}],
// 使用新的插件命名
["@babel/plugin-transform-runtime", {
"corejs": 3,
"helpers": true,
"regenerator": true,
"useESModules": false
}],
["@babel/plugin-proposal-decorators", {
"legacy": true
}],
["@babel/plugin-syntax-dynamic-import"],
["@babel/plugin-transform-class-properties"], // 使用新的插件命名
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-json-strings",
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions"
]
}