-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.js
48 lines (47 loc) · 943 Bytes
/
vite.config.js
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
36
37
38
39
40
41
42
43
44
45
46
47
48
import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'
export default defineConfig({
test: {
typecheck: {
checker: 'vue-tsc',
ignoreSourceErrors: true,
include: ['src/**/*.spec-d.ts'],
},
include: ['src/**/*.spec.ts'],
environmentMatchGlobs: [
['**\/*.browser.spec.ts', 'happy-dom'],
['**\/*.spec.ts', 'node'],
],
},
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, 'src'),
},
],
},
build: {
lib: {
entry: resolve(__dirname, 'src/main.ts'),
name: '@kitbag/router',
fileName: 'kitbag-router',
},
rollupOptions: {
external: ['vue', 'zod'],
output: {
globals: {
vue: 'Vue',
},
},
},
},
plugins: [
vue(),
dts({
rollupTypes: true,
}),
],
})