fix: do not skip app-wrapper for sibling routes (#2911)

This PR adds a unit test for the issue in #2910. I have not found a
solution yet, since I'm not very familiar with the `fsRoutes` code, and
what it is doing. But a thought a unit test with the failing code could
help to find a bug fix.

**Edit:** I managed to fix the failing test by removing a couple of
lines, but I'm not too familiar with the code so I'm not sure if it's
correct. It seems to pass all the tests still...

Closes #2910
This commit is contained in:
Christian Svensson
2025-05-13 18:03:13 +02:00
committed by GitHub
parent f15f225576
commit e2d0624512
2 changed files with 50 additions and 2 deletions
-2
View File
@@ -221,12 +221,10 @@ export async function fsRoutes<State>(
// _app template
if (skipApp && mod.path === "/_app") {
hasApp = false;
continue;
} else if (!skipApp && mod.config?.skipAppWrapper) {
skipApp = true;
if (hasApp) {
hasApp = false;
// _app component is always first
components.shift();
}