-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.babelrc.js
40 lines (34 loc) · 807 Bytes
/
.babelrc.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
40
/**
* This file is managed by backtrack
*
* source: @backtrack/preset-node
* namespace: babel
*
* DO NOT MODIFY
*/
'use strict';
const { Backtrack } = require('@backtrack/core');
const nodeVersion = require('@backtrack/preset-node/lib/utils/node-version');
const { pkg, configManager } = new Backtrack();
const backtrackId = '@backtrack/preset-node';
const babel = {
presets: [
[
pkg.resolve(backtrackId, '@babel/preset-env'),
{
targets: {
node: nodeVersion,
},
},
],
],
plugins: [
pkg.resolve(backtrackId, 'babel-plugin-dynamic-import-node'),
pkg.resolve(backtrackId, '@babel/plugin-proposal-class-properties'),
pkg.resolve(backtrackId, '@babel/plugin-transform-strict-mode'),
],
};
module.exports = configManager({
namespace: 'babel',
config: babel,
});