-
-
Notifications
You must be signed in to change notification settings - Fork 837
Expand file tree
/
Copy pathbabel.config.js
More file actions
32 lines (31 loc) · 665 Bytes
/
babel.config.js
File metadata and controls
32 lines (31 loc) · 665 Bytes
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
const fs = require('fs')
const path = require('path')
module.exports = {
babelrcRoots: fs
.readdirSync(path.join(__dirname, 'packages'))
.map((dirname) => path.join(__dirname, 'packages', dirname))
.filter((dirpath) => {
const stats = fs.statSync(dirpath)
return stats.isDirectory()
}),
overrides: [
{
presets: ['@babel/preset-typescript'],
test: /\.tsx?$/,
},
],
presets: [
[
'@babel/preset-env',
{
targets: {
node: '14',
},
},
],
],
plugins: [
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-class-properties',
],
}