-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
44 lines (43 loc) · 1.25 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
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'
// https://vitejs.dev/config/
// https://stackoverflow.com/a/74397545/445757
export default defineConfig({
plugins: [vue(), dts()],
build: {
outDir: './dist',
lib: {
entry: {
plugins: 'src/index.ts',
components: 'src/components.ts'
}
},
rollupOptions: {
external: ['vue', 'vue-router', 'pinia', '@userfrosting/sprinkle-core'],
output: {
exports: 'named',
globals: {
vue: 'Vue',
'vue-router': 'vueRouter'
}
}
}
},
// Add UIKit alias : https://stackoverflow.com/a/75264118/445757
resolve: {
alias: {
'../../images/backgrounds': 'uikit/src/images/backgrounds',
'../../images/components': 'uikit/src/images/components',
'../../images/icons': 'uikit/src/images/icons'
}
},
test: {
coverage: {
reportsDirectory: './_meta/_coverage',
include: ['src/**/*.*'],
},
environment: 'happy-dom'
}
})