forked from transloadit/uppy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
28 lines (27 loc) · 856 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
module.exports = (api) => {
const targets = {}
if (api.env('test')) {
targets.node = 'current'
}
return {
presets: [
['@babel/preset-env', {
include: [
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-numeric-separator',
],
loose: true,
targets,
useBuiltIns: false, // Don't add polyfills automatically.
// We can uncomment the following line if we start adding polyfills to the non-legacy dist files.
// corejs: { version: '3.24', proposals: true },
modules: false,
}],
],
plugins: [
['@babel/plugin-transform-react-jsx', { pragma: 'h' }],
process.env.NODE_ENV !== 'dev' && 'babel-plugin-inline-package-json',
].filter(Boolean),
}
}