Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
fix: nested routing
Browse files Browse the repository at this point in the history
  • Loading branch information
galvez committed Jul 4, 2022
1 parent 8d5a319 commit c2cdcbb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/fastify-dx-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "index.js",
"name": "fastify-dx-react",
"version": "0.0.3",
"version": "0.0.4",
"files": [
"virtual/create.jsx",
"virtual/root.jsx",
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-react/virtual/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function createRoutes (from, { param } = { param: $paramPattern }) {
// Replace '/index' with '/'
.replace(/\/index$/, '/')
// Remove trailing slashs
.replace(/.+\/+$/, ''),
.replace(/(.+)\/+$/, (...m) => m[1]),
...routeModule,
}
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "index.js",
"name": "fastify-dx-solid",
"version": "0.0.2",
"version": "0.0.3",
"files": [
"virtual/create.jsx",
"virtual/root.jsx",
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-solid/virtual/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function createRoutes (from, { param } = { param: $paramPattern }) {
// Replace '/index' with '/'
.replace(/\/index$/, '/')
// Remove trailing slashs
.replace(/.+\/+$/, ''),
.replace(/(.+)\/+$/, (...m) => m[1]),
...routeModule,
}
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "index.js",
"name": "fastify-dx-svelte",
"version": "0.0.3",
"version": "0.0.4",
"files": [
"virtual/root.svelte",
"virtual/route.svelte",
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-svelte/virtual/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function createRoutes (from, { param } = { param: $paramPattern }) {
// Replace '/index' with '/'
.replace(/\/index$/, '/')
// Remove trailing slashs
.replace(/.+\/+$/, ''),
.replace(/(.+)\/+$/, (...m) => m[1]),
...routeModule,
}
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "index.js",
"name": "fastify-dx-vue",
"version": "0.0.2",
"version": "0.0.3",
"files": [
"virtual/create.js",
"virtual/root.vue",
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify-dx-vue/virtual/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function createRoutes (from, { param } = { param: $paramPattern }) {
// Replace '/index' with '/'
.replace(/\/index$/, '/')
// Remove trailing slashs
.replace(/.+\/+$/, ''),
.replace(/(.+)\/+$/, (...m) => m[1]),
...routeModule,
}
}),
Expand Down

0 comments on commit c2cdcbb

Please sign in to comment.