mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 20:58:22 +08:00
59 lines
1.1 KiB
JavaScript
59 lines
1.1 KiB
JavaScript
module.exports = {
|
|
// ATTENTION!!
|
|
// Preset ordering is reversed, so `@babel/typescript` will called first
|
|
// Do not put `@babel/typescript` before `@babel/env`, otherwise will cause a compile error
|
|
// See https://github.com/babel/babel/issues/12066
|
|
presets: [
|
|
[
|
|
'@babel/env',
|
|
{
|
|
loose: true,
|
|
modules: false,
|
|
},
|
|
],
|
|
'@babel/typescript',
|
|
],
|
|
plugins: [
|
|
'@vue/babel-plugin-jsx',
|
|
'@babel/proposal-class-properties',
|
|
'@babel/transform-runtime',
|
|
'lodash',
|
|
],
|
|
overrides: [
|
|
{
|
|
test: /\.vue$/,
|
|
plugins: [
|
|
'@babel/transform-typescript',
|
|
],
|
|
},
|
|
],
|
|
env: {
|
|
utils: {
|
|
ignore: [
|
|
'**/*.test.ts',
|
|
'**/*.spec.ts',
|
|
],
|
|
presets: [
|
|
[
|
|
'@babel/env',
|
|
{
|
|
loose: true,
|
|
modules: false,
|
|
},
|
|
],
|
|
],
|
|
plugins: [
|
|
[
|
|
'babel-plugin-module-resolver',
|
|
{
|
|
root: ['element-plus'],
|
|
alias: {
|
|
'@element-plus': 'element-plus/lib',
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
}
|