-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
26 lines (25 loc) · 1.21 KB
/
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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import pkg from './package.json' assert { type: 'json' }
import svelte5uilib from './node_modules/svelte-5-ui-lib/package.json' assert { type: 'json' }
import sveltePackage from './node_modules/svelte/package.json' assert { type: 'json' }
import svelteKitPackage from './node_modules/@sveltejs/kit/package.json' assert { type: 'json' }
import vitePackage from './node_modules/vite/package.json' assert { type: 'json' }
import fusePackage from './node_modules/fuse.js/package.json' assert { type: 'json' }
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
define: {
__NAME__: JSON.stringify(pkg.name),
__DESCRIPTION__: JSON.stringify(pkg.description),
__VERSION__: JSON.stringify(pkg.version),
__GITHUBURL__: JSON.stringify(pkg.repository.url),
__SVELTE_VERSION__: JSON.stringify(sveltePackage.version),
__SVELTEKIT_VERSION__: JSON.stringify(svelteKitPackage.version),
__VITE_VERSION__: JSON.stringify(vitePackage.version),
__SVELTE_5_UI_LIB_VERSION__: JSON.stringify(svelte5uilib.version),
__FUSEVERSION__: JSON.stringify(fusePackage.version),
},
});