mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
* meta: build bundle using esbuild * meta: don't use terser to build minified bundle * website: use esbuild instead of browserify * remove disc and disc.html * Update lock file * Simplify inject script * nits * fix `yarn start`
28 lines
856 B
JavaScript
28 lines
856 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',
|
|
'@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.15', proposals: true },
|
|
modules: false,
|
|
}],
|
|
],
|
|
plugins: [
|
|
['@babel/plugin-transform-react-jsx', { pragma: 'h' }],
|
|
process.env.NODE_ENV !== 'dev' && 'babel-plugin-inline-package-json',
|
|
].filter(Boolean),
|
|
}
|
|
}
|