-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
52 lines (51 loc) · 1.13 KB
/
vite.config.ts
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
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { resolve } from 'path';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
port: 8888
},
build: {
cssCodeSplit: false,
lib: {
entry: resolve(__dirname, 'src/index.ts'),
formats: ['es', 'cjs'],
name: 'pdap-design-system',
fileName: 'index',
},
outDir: 'dist',
emptyOutDir: true,
rollupOptions: {
external: ['vue', 'vue-router', '**/__snapshots__/', '**/*.spec.ts'],
output: {
assetFileNames: ({ name }) => {
if (name === 'style.css') return 'styles.css';
},
globals: {
vue: 'Vue',
},
},
},
},
optimizeDeps: { include: ['vue-router'] },
test: {
coverage: {
all: true,
exclude: ['src/demo/*'],
include: ['src/**/*.vue', 'src/utils/**/*.ts'],
provider: 'v8',
reportsDirectory: './coverage',
},
environment: 'happy-dom',
exclude: ['node_modules'],
globals: true,
include: ['src/**/*.{spec,test}.ts'],
setupFiles: ['tools/testing/setup.ts'],
typecheck: {
include: ['src/**/*.{spec,test}.ts'],
},
},
});