-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.config.js
39 lines (32 loc) · 1001 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
35
36
37
38
39
'use strict';
/* Disable babel root stuff because we want to use only one uniq config for all */
/*
const path = require('path');
const xFs = require('xcraft-core-fs');
let nodeModulesRoot = path.join(__dirname, '..');
let roots = xFs
.lsdir(nodeModulesRoot, /^(xcraft-(core|contrib)|goblin)-/)
.map((root) => `${path.relative(__dirname, nodeModulesRoot)}/${root}/*`);
if (process.env.GOBLIN_WEBPACK_RELEASEPATH) {
nodeModulesRoot = path.join(
process.env.GOBLIN_WEBPACK_RELEASEPATH,
'node_modules'
);
roots = roots.concat(
xFs
.lsdir(nodeModulesRoot, /^(xcraft-(core|contrib)|goblin)-/)
.map((root) => `${path.relative(__dirname, nodeModulesRoot)}/${root}/*`)
);
}
*/
module.exports = {
// babelrcRoots: roots,
presets: ['@babel/preset-react'],
plugins: [
'@babel/proposal-class-properties',
'@babel/proposal-object-rest-spread',
'@babel/proposal-function-bind',
'@babel/transform-modules-commonjs',
'babel-plugin-lodash',
],
};