-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.config.js
34 lines (33 loc) · 949 Bytes
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import pkg from './package.json' assert { type: 'json' };
export default {
browserslistEnv: 'browser',
presets: [
[ '@babel/preset-env', {
// debug: true,
bugfixes: true,
useBuiltIns: false
}],
[ '@babel/preset-typescript', {
allowDeclareFields: true,
optimizeConstEnums: true,
onlyRemoveTypeImports: true
}]
],
plugins: [
[ '@babel/plugin-transform-runtime', {
corejs: false,
version: pkg.dependencies['@babel/runtime']
}],
[ 'babel-plugin-polyfill-corejs3', {
// debug: true,
// exclude: [ 'es.array.push', 'es.array.unshift' ],
method: 'usage-pure',
version: pkg.dependencies['core-js-pure'],
proposals: true
}]
],
overrides: [{
test: 'src/cli/**/*',
browserslistEnv: 'node'
}]
};