Repository navigation
Commit d3a1277
committed
fix(shelf): prevent rspack client clean from deleting server output and guard vite middleware against ssrLoadModule failures
- Rspack client: change output.clean from true to { keep: /^server\// } so the
client compiler's clean pass preserves the server bundle in dist-rspack/server/.
- Vite middleware: try/catch the load() call (which runs ssrLoadModule in dev)
and fall through to next() on failure, so a broken server module does not
block Vite's own requests (/@vite/client, HMR, transforms). The request body
conversion is deferred until after a successful load.1 parent a83e340 commit d3a1277
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
0 commit comments