-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.mts
35 lines (33 loc) · 880 Bytes
/
vite.config.mts
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
import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import svgLoader from 'vite-svg-loader'
import banner from 'vite-plugin-banner'
import dts from 'vite-plugin-dts'
import pkg from './package.json'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
name: 'Trilist',
entry: resolve(__dirname, 'src/main.ts'),
},
},
plugins: [
svelte(),
svgLoader(),
dts({ outDir: 'dist/types', include: 'src/lib', entryRoot: 'src/lib' }),
banner(
`/*! ${pkg.name} v${pkg.version} by ${pkg.author}. Released under the ${pkg.license} license */`,
),
],
test: {
globals: true,
setupFiles: 'test/setup.ts',
environment: 'happy-dom',
coverage: {
provider: 'v8',
reporter: ['text', 'json-summary'],
},
},
})