fix: plugin script error halting JS execution (#1801)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/// <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";
|
||||
|
||||
function throwErr() {
|
||||
throw new Error("Error thrown");
|
||||
}
|
||||
|
||||
await start(manifest, {
|
||||
plugins: [
|
||||
{
|
||||
name: "thrower",
|
||||
entrypoints: {
|
||||
main: `data:application/javascript,export default ${throwErr}`,
|
||||
},
|
||||
render(ctx) {
|
||||
ctx.render();
|
||||
return { scripts: [{ entrypoint: "main", state: {} }] };
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user