blob: 84d1b0cda0b090e77e54644a44fa38144183091a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
import tailwindcss from "@tailwindcss/vite";
// Fallback only. ALWAYS prefer per-icon imports like:
// import ListIcon from "phosphor-svelte/lib/ListIcon";
// Named imports from "phosphor-svelte" pull in the full barrel and slow Vite
// compilation. This plugin rewrites any stray named imports into per-icon
// default imports at build/dev time, so we don't get crippled if an agent
// forgets the correct pattern. Treat it as a safety net, not a license to
// use named imports.
import { sveltePhosphorOptimize } from "phosphor-svelte/vite";
import { defineConfig } from "vite";
export default defineConfig({
base: "./",
plugins: [tailwindcss(), sveltePhosphorOptimize(), svelte()],
server: {
port: 5173,
allowedHosts: true,
},
test: {
include: ["tests/**/*.test.ts"],
},
});
|