feat: inject process.env.NODE_ENV for third party libs (#2481)

This commit is contained in:
Marvin Hagemeister
2024-05-31 15:18:23 +02:00
committed by GitHub
parent 88c3671a09
commit 9347b84cba
4 changed files with 58 additions and 1 deletions
+3 -1
View File
@@ -24,6 +24,7 @@ import { PassThrough } from "./fixtures_islands/PassThrough.tsx";
import { SelfCounter } from "./fixtures_islands/SelfCounter.tsx";
import { Multiple1, Multiple2 } from "./fixtures_islands/Multiple.tsx";
import { Foo } from "./fixture_island_groups/routes/foo/(_islands)/Foo.tsx";
import { NodeProcess } from "./fixtures_islands/NodeProcess.tsx";
export function getIsland(pathname: string) {
return path.join(
@@ -87,7 +88,7 @@ export async function withBrowserApp(
const browser = await launch({
args: ["--no-sandbox"],
// headless: false,
headless: !Deno.args.includes("--headful"),
});
const page = await browser.newPage();
@@ -376,6 +377,7 @@ export const allIslandApp = new App()
.island(getIsland("PartialInIsland.tsx"), "PartialInIsland", PartialInIsland)
.island(getIsland("PassThrough.tsx"), "PassThrough", PassThrough)
.island(getIsland("SelfCounter.tsx"), "SelfCounter", SelfCounter)
.island(getIsland("NodeProcess.tsx"), "NodeProcess", NodeProcess)
.island(
getIsland("../fixture_island_groups/routes/foo/(_islands)/Foo.tsx"),
"Foo",