forked from huntabyte/bits-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (35 loc) · 882 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
/// <reference types="vitest" />
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vitest/config";
import { fileURLToPath, URL } from "url";
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ["src/**/*.{test,spec}.{js,ts}"],
// jest like globals
globals: true,
environment: "jsdom",
// in-source testing
includeSource: ["src/**/*.{js,ts,svelte}"],
// Add @testing-library/jest-dom's matchers & mocks of SvelteKit modules
setupFiles: ["./other/setupTest.ts"],
coverage: {
exclude: ["setupTest.ts"]
},
alias: [{ find: /^svelte$/, replacement: "svelte/internal" }]
},
assetsInclude: ["**/*.md"],
server: {
fs: {
strict: false
}
},
resolve: {
alias: [
{
find: "contentlayer/generated",
replacement: fileURLToPath(new URL("./.contentlayer/generated", import.meta.url))
}
]
}
});