fix: codeframe not visible with custom _500.tsx (#1869)

This commit is contained in:
Marvin Hagemeister
2023-10-05 16:29:22 +02:00
committed by GitHub
parent a838a6c733
commit 4044b5be78
8 changed files with 81 additions and 2 deletions
+4
View File
@@ -0,0 +1,4 @@
import { dev } from "$fresh/src/dev/dev_command.ts";
import config from "./fresh.config.ts";
await dev(import.meta.url, "./main.ts", config);
@@ -0,0 +1,8 @@
import { defineConfig } from "$fresh/server.ts";
import twind from "$fresh/plugins/twind.ts";
export default defineConfig({
plugins: [twind({
selfURL: import.meta.url,
})],
});
+17
View File
@@ -0,0 +1,17 @@
// DO NOT EDIT. This file is generated by Fresh.
// This file SHOULD be checked into source version control.
// This file is automatically updated during development when running `dev.ts`.
import * as $0 from "./routes/_500.tsx";
import * as $1 from "./routes/index.tsx";
const manifest = {
routes: {
"./routes/_500.tsx": $0,
"./routes/index.tsx": $1,
},
islands: {},
baseUrl: import.meta.url,
};
export default manifest;
+11
View File
@@ -0,0 +1,11 @@
/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />
import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
import config from "./fresh.config.ts";
await start(manifest, config);
@@ -0,0 +1,3 @@
export default function Error() {
return <h1>500 page</h1>;
}
@@ -0,0 +1,4 @@
// deno-lint-ignore no-explicit-any
export default function Page(): any {
throw new Error("fail");
}