fix(vite): cover more commonjs cases (#3465)

Fixes https://github.com/denoland/fresh/issues/3463
Fixes https://github.com/denoland/fresh/issues/3449
This commit is contained in:
Marvin Hagemeister
2025-09-19 18:36:51 +02:00
committed by GitHub
parent a6016fc045
commit 9b83a1e1b3
9 changed files with 349 additions and 83 deletions
@@ -420,6 +420,28 @@ Deno.test({
sanitizeResources: false,
});
Deno.test({
name: "vite dev - redis",
fn: async () => {
const res = await fetch(`${demoServer.address()}/tests/redis`);
const text = await res.text();
expect(text).toContain("<h1>redis</h1>");
},
sanitizeOps: false,
sanitizeResources: false,
});
Deno.test({
name: "vite dev - @supabase/postgres-js",
fn: async () => {
const res = await fetch(`${demoServer.address()}/tests/supabase_pg`);
const text = await res.text();
expect(text).toContain("<h1>supabase</h1>");
},
sanitizeOps: false,
sanitizeResources: false,
});
Deno.test({
name: "vite dev - radix",
fn: async () => {