UNPKG

617 BJavaScriptView Raw
1const debug = process.env.DEBUG === 'timpla'
2const isProduction = process.env.NODE_ENV === 'production'
3
4module.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}