You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
682 B
32 lines
682 B
const { NODE_ENV } = process.env
|
|
|
|
const __TEST__ = NODE_ENV === 'test'
|
|
|
|
module.exports = () => ({
|
|
presets: [
|
|
[
|
|
require('@babel/preset-env'),
|
|
{
|
|
loose: true,
|
|
modules: __TEST__ ? 'commonjs' : false,
|
|
targets: {
|
|
electron: '1.8',
|
|
node: 'current',
|
|
},
|
|
},
|
|
],
|
|
require('@babel/preset-flow'),
|
|
require('@babel/preset-react'),
|
|
require('@babel/preset-stage-0'),
|
|
],
|
|
plugins: [
|
|
[require('babel-plugin-module-resolver'), { root: ['src'] }],
|
|
[
|
|
require('babel-plugin-styled-components'),
|
|
{
|
|
displayName: NODE_ENV === 'development',
|
|
ssr: __TEST__,
|
|
},
|
|
],
|
|
],
|
|
})
|
|
|