-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
34 lines (33 loc) · 757 Bytes
/
vite.config.js
File metadata and controls
34 lines (33 loc) · 757 Bytes
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
import { defineConfig } from 'vite'
import { configDefaults } from 'vitest/config'
import preact from '@preact/preset-vite'
export default defineConfig({
plugins: [preact()],
build: {
target: 'esnext',
lib: {
formats: ['es'],
entry: {
index: './src/index.ts'
}
},
rolldownOptions: {
external: id => /^(preact|@nano_kit)\/?/.test(id),
output: {
topLevelVar: false
}
},
sourcemap: true,
minify: false,
emptyOutDir: false
},
test: {
environment: 'happy-dom',
setupFiles: ['@testing-library/jest-dom/vitest'],
exclude: [...configDefaults.exclude, './package'],
coverage: {
reporter: ['lcovonly', 'text'],
include: ['src/**/*']
}
}
})