1 | const debug = process.env.DEBUG === 'timpla'
|
2 | const isProduction = process.env.NODE_ENV === 'production'
|
3 |
|
4 | module.exports = {
|
5 | presets: [
|
6 | [
|
7 | '@babel/preset-env',
|
8 | {
|
9 | // usage automatically injects @babel/polyfill, so older browsers may still work
|
10 | // see https://babeljs.io/docs/en/babel-polyfill
|
11 | // We're only loading this for production builds so development compilation times are faster!
|
12 | ...(isProduction && { useBuiltIns: 'usage' }),
|
13 | debug,
|
14 | },
|
15 | ],
|
16 | '@babel/preset-typescript',
|
17 | '@babel/preset-react',
|
18 | ],
|
19 | plugins: ['react-hot-loader/babel'],
|
20 | }
|