-
Notifications
You must be signed in to change notification settings - Fork 4
/
babel.js
26 lines (26 loc) · 796 Bytes
/
babel.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
const path = require('path');
const corePath = path.join(__dirname, './core');
const utilsPath = path.join(__dirname, './src/utils');
const srcPath = path.join(__dirname, './src');
// https://github.com/babel/babel/issues/8321
require('@babel/polyfill');
require('@babel/register')({
presets: [ '@babel/preset-env' ],
plugins: [
[
'@babel/plugin-proposal-decorators',
{ legacy: true }
],
// ['@babel/plugin-syntax-decorators', { decoratorsBeforeExport: true }],
["module-resolver", {
"alias": {
"@Core": corePath,
"@Utils": utilsPath,
"@Src": srcPath
}
}],
['@babel/plugin-proposal-class-properties', {loose: true}],
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-modules-commonjs'
]
});