Skip to content

Commit 687df07

Browse files
authored
Webpack: use filesystem cache to speed up boot time (#633)
Same as readthedocs/ext-theme#643 It speeds up boot time by ~8x.
1 parent f5e2a23 commit 687df07

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

webpack.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ module.exports = (env, argv) => {
3535
chunkFilename: "[name].js?[chunkhash]",
3636
path: path.join(__dirname, "dist"),
3737
},
38+
39+
// Use filesystem for cache instead memory (default) to be re-use the cache
40+
// between Docker container starts/stops. This speeds up boot time a lot.
41+
cache: {
42+
type: is_production ? "memory" : "filesystem",
43+
},
44+
3845
optimization: {
3946
minimize: is_production,
4047
minimizer: [

0 commit comments

Comments
 (0)