-
Notifications
You must be signed in to change notification settings - Fork 1
/
babel.config.js
40 lines (38 loc) · 1.26 KB
/
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
40
module.exports = {
presets: ['@babel/env'],
overrides: [
{
test: 'packages/excmd/**/*',
presets: ['@babel/env', '@babel/preset-typescript'],
plugins: [
[
'@babel/plugin-transform-runtime',
{
// TEMP: This should be re-enabled once we get `bs-platform@9.0.0`, which actually
// ships proper `.mjs` files
// useESModules: true,
// NOTE: It's unclear if this value supports semver ranges or not; but I am
// choosing to duplicate the value from `package.json` precisely.
//
// See: <https://github.com/babel/babel/blob/9808d2/packages/babel-plugin-transform-runtime/src/helpers.js#L4-L33>
version: '~7.12.5', // @babel/runtime version
},
],
],
},
{
test: 'packages/excmd/examples/**/*',
presets: [
[
'@babel/env',
{
targets: {node: '12'},
// preserve ESModules intact
modules: false,
},
],
],
},
],
babelrcRoots: ['.', './packages/*'],
}