Unverified Commit 300507ba authored by Shu Ding's avatar Shu Ding Committed by GitHub

Enable compression for Webpack's cache during dev (#51851)

This is already the default for production build, but we are also enabling it for development. It has small perf impact as gzip takes time, but it significantly improves the disk usage and time for reading and writing to the filesystem. This is especially the case when working on a large codebase and we are transpiling and bundling more modules now.
parent 8b60fbc7
......@@ -2630,6 +2630,7 @@ export default async function getBaseWebpackConfig(
// - next.config.js keys that affect compilation
version: `${process.env.__NEXT_VERSION}|${configVars}`,
cacheDirectory: path.join(distDir, 'cache', 'webpack'),
compression: 'gzip',
}
// Adds `next.config.js` as a buildDependency when custom webpack config is provided
......
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