Skip to content

Commit 48924a9

Browse files
committed
chore: combine vitest config into vite.config.js
1 parent 309edd2 commit 48924a9

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

vite.config.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import { sveltekit } from "@sveltejs/kit/vite";
2+
import { svelte } from "@sveltejs/vite-plugin-svelte";
23

34
/** @type {import('vite').UserConfig} */
45
const config = {
5-
plugins: [sveltekit()],
6+
plugins: [
7+
process.env.VITEST
8+
? svelte({
9+
hot: false,
10+
})
11+
: sveltekit(),
12+
],
613
optimizeDeps: {
714
include: ["highlight.js", "highlight.js/lib/core"],
815
},
@@ -11,6 +18,10 @@ const config = {
1118
allow: [".."],
1219
},
1320
},
21+
test: {
22+
globals: true,
23+
environment: "jsdom",
24+
},
1425
};
1526

16-
export default config;
27+
export default config;

vitest.config.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)