Commit a985d43
committed
fix: invalidate Vite module graph on template/style HMR updates
When a template or style file changes, the custom fs.watch callback
clears the internal resourceCache and sends an angular:component-update
WebSocket event. However, it does not invalidate the corresponding
module in Vite's module graph. This causes Vite's transform cache to
serve stale compiled output on full page reloads.
Add a moduleGraph.invalidateModule() call after the WS event is sent
so that Vite re-transforms the component module on the next request.1 parent 44d2074 commit a985d43
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
| |||
0 commit comments