Revert "feat: Add experimental vite plugin (#3184)" (#3185)

This reverts commit a1571b76ed.

It broke fresh.deno.dev :S
This commit is contained in:
Marvin Hagemeister
2025-08-04 18:54:04 +02:00
committed by GitHub
parent a1571b76ed
commit 2f76a0a2aa
54 changed files with 742 additions and 2181 deletions
-71
View File
@@ -1,71 +0,0 @@
import { expect } from "@std/expect";
import {
waitForText,
withBrowser,
withChildProcessServer,
} from "../../tests/test_utils.tsx";
import { buildVite } from "./test_utils.ts";
Deno.test({
name: "vite build - launches",
fn: async () => {
await using res = await buildVite();
await withChildProcessServer(
res.tmp,
["serve", "-A", "--port", "0", "_fresh/server.js"],
async (address) => {
const res = await fetch(address);
const text = await res.text();
expect(text).toEqual("it works");
},
);
},
sanitizeOps: false,
sanitizeResources: false,
});
Deno.test({
name: "vite build - serves static files",
fn: async () => {
await using res = await buildVite();
await withChildProcessServer(
res.tmp,
["serve", "-A", "--port", "0", "_fresh/server.js"],
async (address) => {
const res = await fetch(`${address}/test_static/foo.txt`);
const text = await res.text();
expect(text).toEqual("it works");
},
);
},
sanitizeOps: false,
sanitizeResources: false,
});
Deno.test({
name: "vite build - loads islands",
fn: async () => {
await using res = await buildVite();
await withChildProcessServer(
res.tmp,
["serve", "-A", "--port", "0", "_fresh/server.js"],
async (address) => {
await withBrowser(async (page) => {
await page.goto(`${address}/tests/island_hooks`, {
waitUntil: "networkidle2",
});
await waitForText(page, "button", "count: 0");
await page.locator("button").click();
await waitForText(page, "button", "count: 1");
});
},
);
},
sanitizeOps: false,
sanitizeResources: false,
});