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:
+3
-2
@@ -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>
|
||||
);
|
||||
}`;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user