Commit f88d0f7
fix(packages/cli): disable persistent build cache on config-reload restart (#67)
Rspress's persistent build cache (`buildCache.cacheDigest`) only tracks
sidebar/nav structure and the Rspress version. It is unaware of zpress-specific
config values (title, theme, colors, `source.define` compile-time constants).
When only those values changed, the stale cached build output was served,
making config changes appear to have no effect.
Additionally, `configFilePath: ''` meant the file-based `buildDependencies`
invalidation path was a no-op, so no config file change could bust the cache.
Disable the persistent build cache on config-reload restarts by passing
`performance: { buildCache: false }` via `extraBuilderConfig`. The initial
cold start still benefits from the cache; only restarts triggered by config
changes bypass it to force a fresh Rsbuild compilation.
Co-authored-by: Claude <noreply@anthropic.com>1 parent c808623 commit f88d0f7
2 files changed
Lines changed: 47 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
69 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
70 | 81 | | |
71 | 82 | | |
72 | 83 | | |
| |||
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
| |||
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
98 | | - | |
| 114 | + | |
99 | 115 | | |
100 | 116 | | |
101 | 117 | | |
| |||
128 | 144 | | |
129 | 145 | | |
130 | 146 | | |
131 | | - | |
132 | | - | |
| 147 | + | |
| 148 | + | |
133 | 149 | | |
134 | 150 | | |
135 | 151 | | |
| |||
233 | 249 | | |
234 | 250 | | |
235 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
236 | 272 | | |
237 | 273 | | |
238 | 274 | | |
| |||
0 commit comments