-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
49 lines (47 loc) · 1.22 KB
/
Copy pathvite.config.ts
File metadata and controls
49 lines (47 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { fileURLToPath, URL } from "node:url";
import tailwindcss from "@tailwindcss/vite";
import { vuerend } from "@vuerend/core/vite";
import type { PluginOption } from "vite-plus";
import { defineConfig } from "vite-plus";
import { playwright } from "vite-plus/test/browser-playwright";
import { cloudflarePages404, museaGallery, staticHtmlPreview } from "./config/vite/plugins";
import { fmt, lint, runTasks } from "./config/vite/tooling";
export { fmt, lint };
export default defineConfig({
plugins: [
tailwindcss(),
...museaGallery(),
vuerend({
app: "./src/app.ts",
islands: "./src/islands.ts",
}),
staticHtmlPreview(),
cloudflarePages404(),
] as PluginOption[],
resolve: {
alias: {
// Keep the SSR renderer on the ESM entry for Vite's module runner.
"@vue/server-renderer": fileURLToPath(
new URL(
"./node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js",
import.meta.url,
),
),
},
},
staged: {
"*": "vp run check",
},
test: {
browser: {
enabled: true,
provider: playwright(),
instances: [{ browser: "chromium" }],
},
},
run: {
tasks: runTasks,
},
fmt,
lint,
});