Skip to content

Commit

Permalink
f5ba0d5 fix(#5665): rewritten routes get ignored by dynamic and catch…
Browse files Browse the repository at this point in the history
…All routes (#6101)

QwikDev/qwik@f31c865
  • Loading branch information
fprl committed Apr 9, 2024
1 parent fb97c02 commit 0dd2579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@builder.io/qwik-city",
"description": "The meta-framework for Qwik.",
"version": "1.5.1-dev20240409010701",
"version": "1.5.1-dev20240409065124",
"bugs": "https://github.com/BuilderIO/qwik/issues",
"dependencies": {
"@mdx-js/mdx": "^3.0.1",
Expand Down
3 changes: 2 additions & 1 deletion vite/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -24419,7 +24419,8 @@ function rewriteRoutes(ctx, resolved) {
}
const translatedPath = translatedPathParts.join("/");
const translatedRoute = translatedRouteParts.join("/");
resolved.routes.push({
const originalRouteIndex = resolved.routes.indexOf(rewriteRoute);
resolved.routes.splice(originalRouteIndex + 1, 0, {
...rewriteRoute,
id: rewriteRoute.id + (idSuffix || rewriteIndex),
pathname: pathnamePrefix + translatedPath,
Expand Down
3 changes: 2 additions & 1 deletion vite/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24409,7 +24409,8 @@ function rewriteRoutes(ctx, resolved) {
}
const translatedPath = translatedPathParts.join("/");
const translatedRoute = translatedRouteParts.join("/");
resolved.routes.push({
const originalRouteIndex = resolved.routes.indexOf(rewriteRoute);
resolved.routes.splice(originalRouteIndex + 1, 0, {
...rewriteRoute,
id: rewriteRoute.id + (idSuffix || rewriteIndex),
pathname: pathnamePrefix + translatedPath,
Expand Down

0 comments on commit 0dd2579

Please sign in to comment.