Unverified Commit 6e6503f5 authored by Jimmy Lai's avatar Jimmy Lai Committed by GitHub

perf: change the chunks configuration for server code (#57773)

Stumbled upon this while investigating. The previous configuration did not make a lot of sense.

On Node, fs reads can be expensive so it's best to avoid them as much as possible. The current configuration would create chunks eagerly for nothing, leading to sub optimal perf.

The only reason we want chunk on the server is to avoid reloading common parts between entrypoints, so I'm changing the config to reflect that.
parent f3bba78c
...@@ -892,7 +892,7 @@ export default async function getBaseWebpackConfig( ...@@ -892,7 +892,7 @@ export default async function getBaseWebpackConfig(
return { return {
filename: '[name].js', filename: '[name].js',
chunks: 'all', chunks: 'all',
minSize: 1000, minChunks: 2,
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment