chore: fix node out of memory issues (#2712)
This commit is contained in:
@ -102,6 +102,13 @@ const plugins = () => {
|
||||
if (isTest) {
|
||||
return [
|
||||
...defaultPlugins,
|
||||
[
|
||||
'emotion',
|
||||
{
|
||||
sourceMap: false,
|
||||
autoLabel: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
'inline-react-svg',
|
||||
{
|
||||
|
@ -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',
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user