-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.js
68 lines (67 loc) · 1.73 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import {resolve} from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
script: {
propsDestructure: true,
defineModel: true
}
}),
// Icons({
// compiler: 'vue3',
// // expiremental
// autoInstall: true,
// }),
],
esbuild: {
exclude: ['./src/**/**.stories.ts'],
},
build: {
target: 'esnext',
lib: {
entry: resolve(__dirname, 'index.ts'),
name: 'GitsUi',
formats: ['es'],
},
rollupOptions: {
plugins: [
{
name: 'remove-collection-handlers',
transform(code, id) {
if (
id.endsWith('reactivity.esm-bundler.js') ||
id.endsWith('runtime-core.esm-bundler.js')
) {
return code
.replace(`mutableCollectionHandlers,`, `null,`)
.replace(`readonlyCollectionHandlers,`, `null,`);
}
},
},
],
},
},
optimizeDeps: {
include: ['yup', 'fast-deep-equal'],
},
test: {
globals: true,
environment: 'jsdom',
// include: ['packages/**/*.{test,spec}.{js,ts}'],
// exclude: [...configDefaults.exclude, 'dist', 'examples', 'docs', 'starter'],
// setupFiles: "./test/unit/setup-test.ts",
coverage: {
provider: 'c8',
reporter: ['text', 'html', 'lcov', 'json'],
},
reporters: ['html', 'verbose', 'json', 'vitest-sonar-reporter'],
outputFile: {
json: 'coverage/test-report.json',
'vitest-sonar-reporter': 'coverage/test-report.xml',
},
threads: false,
},
});