fix(vite): route css import (#3438)

Fixes https://github.com/denoland/fresh/issues/3426
This commit is contained in:
Marvin Hagemeister
2025-09-15 13:20:07 +02:00
committed by GitHub
parent 016f94e28e
commit 3fb3cd9443
6 changed files with 72 additions and 4 deletions
@@ -306,6 +306,28 @@ Deno.test({
sanitizeOps: false,
});
Deno.test({
name: "vite dev - route css import",
fn: async () => {
await withBrowser(async (page) => {
await page.goto(`${demoServer.address()}/tests/css`, {
waitUntil: "networkidle2",
});
await waitFor(async () => {
const color = await page
.locator("h1")
// deno-lint-ignore no-explicit-any
.evaluate((el) => window.getComputedStyle(el as any).color);
expect(color).toEqual("rgb(255, 0, 0)");
return true;
});
});
},
sanitizeResources: false,
sanitizeOps: false,
});
Deno.test({
name: "vite dev - remote island",
fn: async () => {