Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Ensure server split chunks are nested in chunks dir (vercel#25203)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored May 17, 2021
1 parent a121dd3 commit f2721ca
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 f2721ca

Please sign in to comment.