-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.babelrc
More file actions
24 lines (24 loc) · 923 Bytes
/
.babelrc
File metadata and controls
24 lines (24 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"presets": [
[
"@babel/preset-env", // 根据浏览器和运行环境,自动的确定 babel 插件和 polyfills
{
"useBuiltIns": "usage", // 在每个文件中使用polyfill时,为polyfill添加特定导入。利用捆绑器只加载一次相同的polyfill。
"modules": false, // 启用将ES6模块语法转换为其他模块类型,设置为false不会转换模块。
"corejs": "3", // 声明corejs版本
// "uglify":true // 压缩代码 -- 已经被移除 https://www.babeljs.cn/docs/babel-preset-env#forcealltransforms
}
]
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": false,
"helpers": true,
"regenerator": false,
"useESModules": true,
}
]
]
}