-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (29 loc) · 782 Bytes
/
vite.config.ts
File metadata and controls
30 lines (29 loc) · 782 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
/// <reference types="vitest/config" />
import { defineConfig } from 'vite'
import { resolve } from 'node:path'
import { builtinModules } from 'node:module'
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
fileName: 'index',
formats: ['es']
},
target: 'es2022',
sourcemap: true,
rollupOptions: {
external: [...builtinModules, ...builtinModules.map(m => `node:${m}`)],
output: {
inlineDynamicImports: true
},
preserveSymlinks: true
}
},
test: {
coverage: {
include: ['src/*.ts'],
provider: 'v8',
reporter: ['lcovonly']
}
}
})