mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-24 02:38:58 +00:00
And remove the proposal-object-rest-spread plugin because it is built into preset-env now.
22 lines
532 B
JavaScript
22 lines
532 B
JavaScript
module.exports = (api) => {
|
|
let targets = {}
|
|
if (api.env('test')) {
|
|
targets.node = 'current'
|
|
}
|
|
|
|
return {
|
|
presets: [
|
|
['@babel/preset-env', {
|
|
modules: false,
|
|
loose: true,
|
|
targets
|
|
}]
|
|
],
|
|
plugins: [
|
|
['@babel/plugin-proposal-class-properties', { loose: true }],
|
|
'@babel/plugin-transform-object-assign',
|
|
['@babel/plugin-transform-react-jsx', { pragma: 'h' }],
|
|
process.env.IS_RELEASE_BUILD && 'babel-plugin-inline-package-json'
|
|
].filter(Boolean)
|
|
}
|
|
}
|