mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
23 lines
669 B
JavaScript
23 lines
669 B
JavaScript
module.exports = (api) => {
|
|
const targets = {}
|
|
if (api.env('test')) {
|
|
targets.node = 'current'
|
|
}
|
|
|
|
return {
|
|
presets: [
|
|
['@babel/preset-env', {
|
|
include: ['@babel/plugin-proposal-nullish-coalescing-operator'],
|
|
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.15', proposals: true },
|
|
}],
|
|
],
|
|
plugins: [
|
|
['@babel/plugin-transform-react-jsx', { pragma: 'h' }],
|
|
'babel-plugin-inline-package-json',
|
|
].filter(Boolean),
|
|
}
|
|
}
|