-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathvite.config.js
More file actions
64 lines (63 loc) · 1.29 KB
/
vite.config.js
File metadata and controls
64 lines (63 loc) · 1.29 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'
export default defineConfig({
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, 'src'),
},
],
},
test: {
projects: [
{
extends: true,
test: {
name: 'browser',
environment: 'happy-dom',
include: ['src/**/*.browser.spec.ts'],
},
},
{
extends: true,
test: {
name: 'node',
environment: 'node',
include: ['src/**/*.spec.ts'],
exclude: ['src/**/*.browser.spec.ts'],
typecheck: {
enabled: true,
checker: 'vue-tsc',
ignoreSourceErrors: true,
tsconfig: './tsconfig.json',
include: ['src/**/*.spec-d.ts'],
},
},
},
],
},
build: {
lib: {
entry: resolve(__dirname, 'src/main.ts'),
name: '@kitbag/router',
fileName: 'kitbag-router',
},
rollupOptions: {
external: ['vue', 'zod', /^node:/],
output: {
globals: {
vue: 'Vue',
},
},
},
},
plugins: [
vue(),
dts({
insertTypesEntry: true,
}),
],
})