fix: basePath not working in dev server (#3202)

Fixes https://github.com/denoland/fresh/issues/3201
This commit is contained in:
Marvin Hagemeister
2025-08-07 12:38:37 +02:00
committed by GitHub
parent 073bacfbbb
commit 3d1eb2c346
5 changed files with 64 additions and 12 deletions
+3 -1
View File
@@ -273,6 +273,7 @@ function applyCommandsInner<State>(
const routePath = mergePath(
basePath,
config?.routeOverride ?? pattern,
false,
);
let def: Route<State>;
@@ -304,6 +305,7 @@ function applyCommandsInner<State>(
const routePath = toRoutePath(mergePath(
basePath,
route.config?.routeOverride ?? pattern,
false,
));
if (typeof route.handler === "function") {
@@ -333,7 +335,7 @@ function applyCommandsInner<State>(
result.push(...fns);
const resPath = toRoutePath(mergePath(basePath, pattern));
const resPath = toRoutePath(mergePath(basePath, pattern, false));
if (method === "ALL") {
router.add("GET", resPath, result);
router.add("DELETE", resPath, result);