Skip to content

Commit

Permalink
Ensure server split chunks are nested in chunks dir (#25203)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored May 17, 2021
1 parent 7426ebc commit 9c6d7bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,13 +824,14 @@ export default async function getBaseWebpackConfig(
nodeEnv: false,
splitChunks: isServer
? isWebpack5
? {
? ({
filename: `${dev ? '[name]' : '[name].[contenthash]'}.js`,
// allow to split entrypoints
chunks: 'all',
// size of files is not so relevant for server build
// we want to prefer deduplication to load less code
minSize: 1000,
}
} as any)
: false
: splitChunksConfig,
runtimeChunk: isServer
Expand Down

0 comments on commit 9c6d7bb

Please sign in to comment.