Skip to content

Commit ca897c5

Browse files
authored
Merge pull request #7914 from gioboa/fix/7852
fix: return 404 for missing build files 🐵
2 parents 322ad28 + b0084a3 commit ca897c5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/hot-knives-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@builder.io/qwik-city': patch
3+
---
4+
5+
FIX: return 404 for missing /build/ files.

packages/qwik-city/src/runtime/src/route-matcher.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ function matchRoutePart(
2323
pathIdx: number,
2424
pathLength: number
2525
): PathParams | null {
26+
if (path.startsWith('/build/')) {
27+
return null;
28+
}
29+
2630
let params: PathParams | null = null;
2731
while (routeIdx < routeLength) {
2832
const routeCh = route.charCodeAt(routeIdx++);

0 commit comments

Comments
 (0)