diff --git a/.changeset/hot-knives-hang.md b/.changeset/hot-knives-hang.md new file mode 100644 index 00000000000..5e2da2b4d61 --- /dev/null +++ b/.changeset/hot-knives-hang.md @@ -0,0 +1,5 @@ +--- +'@builder.io/qwik-city': patch +--- + +FIX: return 404 for missing /build/ files. diff --git a/packages/qwik-city/src/runtime/src/route-matcher.ts b/packages/qwik-city/src/runtime/src/route-matcher.ts index 5ac028fbf66..7267946ddd5 100644 --- a/packages/qwik-city/src/runtime/src/route-matcher.ts +++ b/packages/qwik-city/src/runtime/src/route-matcher.ts @@ -23,6 +23,10 @@ function matchRoutePart( pathIdx: number, pathLength: number ): PathParams | null { + if (path.startsWith('/build/')) { + return null; + } + let params: PathParams | null = null; while (routeIdx < routeLength) { const routeCh = route.charCodeAt(routeIdx++);