Skip to content

Commit d6d3aaa

Browse files
committed
chore: limit memory on worker processes
1 parent c166d7d commit d6d3aaa

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

scripts/prod.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ let counter = 0;
1212
const workers = workerFarm(
1313
{
1414
maxConcurrentWorkers: 3,
15-
maxRetries: 0
15+
maxRetries: 0,
16+
workerOptions: {
17+
execArgv: ['--max-old-space-size=2048'],
18+
},
1619
},
17-
require.resolve('./build_locale.js')
20+
require.resolve('./build_locale.js'),
1821
);
1922

20-
[true, false].forEach((react) => {
21-
locales.forEach((locale) => {
22-
workers(locale, react, (error) => {
23+
[true, false].forEach(react => {
24+
locales.forEach(locale => {
25+
workers(locale, react, error => {
2326
if (++counter === bundleCount || error) {
2427
// terminate after all locales have been processed
2528
workerFarm.end(workers);

0 commit comments

Comments
 (0)