fix: nested index route not working in prod builds (#3132)

This was due to a mismatch in the disk snapshot compared to in memory.
This commit is contained in:
Marvin Hagemeister
2025-07-24 21:27:16 +02:00
committed by GitHub
parent e9f0a4bb0c
commit 85c17fac72
7 changed files with 69 additions and 28 deletions
+3 -2
View File
@@ -379,6 +379,7 @@ app.fsRoutes();`;
`import type { ComponentChildren } from "preact";
export interface ButtonProps {
id?: string;
onClick?: () => void;
children?: ComponentChildren;
disabled?: boolean;
@@ -472,9 +473,9 @@ interface CounterProps {
export default function Counter(props: CounterProps) {
return (
<div class="flex gap-8 py-6">
<Button onClick={() => props.count.value -= 1}>-1</Button>
<Button id="decrement" onClick={() => props.count.value -= 1}>-1</Button>
<p class="text-3xl tabular-nums">{props.count}</p>
<Button onClick={() => props.count.value += 1}>+1</Button>
<Button id="increment" onClick={() => props.count.value += 1}>+1</Button>
</div>
);
}`;
+3 -3
View File
@@ -177,11 +177,11 @@ Deno.test("init - can start dev server", async () => {
await patchProject(dir);
await withChildProcessServer(
dir,
"dev",
["task", "dev"],
async (address) => {
await withBrowser(async (page) => {
await page.goto(address);
await page.locator("button").click();
await page.locator("#decrement").click();
await waitForText(page, "button + p", "2");
});
},
@@ -210,7 +210,7 @@ Deno.test("init - can start built project", async () => {
await withChildProcessServer(
dir,
"start",
["task", "start"],
async (address) => {
await withBrowser(async (page) => {
await page.goto(address);