-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.ts
41 lines (39 loc) · 889 Bytes
/
vite.config.ts
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
import laravel from "laravel-vite-plugin";
import { defineConfig } from "vite";
import { configDefaults } from "vitest/config";
// Exclude everything except resources/js/
const projectExcludes = [
"app/*",
"boostrap/*",
"config/*",
"coverage/*",
"database/*",
"public/*",
"resources/css/*",
"resources/views/*",
"routes/*",
"storages/*",
"tests/*",
"vendor/*",
];
// eslint-disable-next-line import/no-default-export
export default defineConfig({
plugins: [
laravel({
input: ["resources/js/app.ts"],
refresh: true,
}),
],
build: {
sourcemap: true,
},
test: {
environment: "jsdom",
exclude: [...configDefaults.exclude, ...projectExcludes],
coverage: {
provider: "v8",
exclude: [...(configDefaults.coverage.exclude ?? []), ...projectExcludes],
},
setupFiles: ["resources/js/setupFile.ts"],
},
});