Repository navigation
Commit 8f20ece
fix(deploy): leave out run_worker_first rules that a wider rule already covers
An `output: "static"` Pages build lists only the paths with server code
in `run_worker_first`, each widened to its static prefix before the
first parameter. When one server path sits under another one's
`/prefix/*` rule, both rules were written:
```
pages/blog/[slug].tsx -> /blog/*
pages/blog/tags/[tag].tsx -> /blog/tags/*
```
Cloudflare rejects that list ("'/blog/tags/*': rule '/blog/*' makes it
redundant"). `vp build` succeeded, but `vp preview` exited and
`wrangler deploy` refused the output. A dynamic API route next to the
starter's `routes/api/hello.ts` (`/api/*` and `/api/hello`) failed the
same way. This affected such apps since 1.6.0 (#660).
The planner now leaves out every rule that a `/prefix/*` rule in the
list already matches, including server paths under the assets folder
rule that a build adds when it cannot list its hashed files. The wider
rule sends the same requests to the Worker, so routing does not change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 7848d23 commit 8f20ece
3 files changed
Lines changed: 72 additions & 3 deletions
File tree
- packages/void
- src
- test
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
288 | 303 | | |
289 | 304 | | |
290 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
646 | 657 | | |
647 | 658 | | |
648 | | - | |
| 659 | + | |
649 | 660 | | |
650 | | - | |
| 661 | + | |
651 | 662 | | |
652 | 663 | | |
653 | 664 | | |
| |||
713 | 724 | | |
714 | 725 | | |
715 | 726 | | |
| 727 | + | |
716 | 728 | | |
| 729 | + | |
717 | 730 | | |
718 | 731 | | |
719 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
173 | 203 | | |
174 | 204 | | |
175 | 205 | | |
| |||
195 | 225 | | |
196 | 226 | | |
197 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
198 | 239 | | |
199 | 240 | | |
200 | 241 | | |
| |||
0 commit comments