chore: fix node out of memory issues (#2712)

This commit is contained in:
Shawn Erquhart
2019-09-30 14:43:06 -04:00
committed by GitHub
parent d64994f1a7
commit 9076530238
2 changed files with 9 additions and 1 deletions

View File

@ -102,6 +102,13 @@ const plugins = () => {
if (isTest) {
return [
...defaultPlugins,
[
'emotion',
{
sourceMap: false,
autoLabel: false,
},
],
[
'inline-react-svg',
{

View File

@ -5,6 +5,7 @@ const { toGlobalName, externals } = require('./externals');
const pkg = require(path.join(process.cwd(), 'package.json'));
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const rules = () => ({
js: () => ({
@ -111,7 +112,7 @@ const baseConfig = ({ target = isProduction ? 'umd' : 'umddir' } = {}) => ({
rules: Object.values(rules()).map(rule => rule()),
},
plugins: Object.values(plugins()).map(plugin => plugin()),
devtool: 'source-map',
devtool: isTest ? '' : 'source-map',
target: 'web',
/**