fix(vite): nested islands not working (#3440)
This PR makes nested islands work. Problem was that only entry files have the `src` property in the vite manifest. For that we need to ensure that every island is an entry point. Fixes https://github.com/denoland/fresh/issues/3439
This commit is contained in:
@@ -83,6 +83,27 @@ Deno.test({
|
||||
sanitizeResources: false,
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "vite build - nested islands",
|
||||
fn: async () => {
|
||||
await launchProd(
|
||||
{ cwd: viteResult.tmp },
|
||||
async (address) => {
|
||||
await withBrowser(async (page) => {
|
||||
await page.goto(`${address}/tests/island_nested`, {
|
||||
waitUntil: "networkidle2",
|
||||
});
|
||||
|
||||
await page.locator(".outer-ready").wait();
|
||||
await page.locator(".inner-ready").wait();
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "vite build - without static/ dir",
|
||||
fn: async () => {
|
||||
|
||||
@@ -328,6 +328,22 @@ Deno.test({
|
||||
sanitizeOps: false,
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "vite dev - nested islands",
|
||||
fn: async () => {
|
||||
await withBrowser(async (page) => {
|
||||
await page.goto(`${demoServer.address()}/tests/island_nested`, {
|
||||
waitUntil: "networkidle2",
|
||||
});
|
||||
|
||||
await page.locator(".outer-ready").wait();
|
||||
await page.locator(".inner-ready").wait();
|
||||
});
|
||||
},
|
||||
sanitizeResources: false,
|
||||
sanitizeOps: false,
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "vite dev - remote island",
|
||||
fn: async () => {
|
||||
|
||||
Reference in New Issue
Block a user