-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (29 loc) · 882 Bytes
/
vite.config.ts
File metadata and controls
33 lines (29 loc) · 882 Bytes
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
/// <reference types="vitest" />
import "dotenv/config";
import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
installGlobals();
const isStorybook = process.argv[1]?.includes("storybook");
const isTestEnv = process.env.VITEST;
const prefix = process.env.HADDOCK3WEBAPP_PREFIX || "/";
const remixConfig = {
basename: prefix,
};
export default defineConfig({
server: {
port: 3000,
host: "0.0.0.0",
},
base: prefix,
plugins: [!(isStorybook || isTestEnv) && remix(remixConfig), tsconfigPaths()],
test: {
environment: "happy-dom",
include: ["./app/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
watchExclude: [".*\\/node_modules\\/.*", ".*\\/build\\/.*"],
coverage: {
provider: "v8",
},
},
});