-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (47 loc) · 1.11 KB
/
vite.config.ts
File metadata and controls
48 lines (47 loc) · 1.11 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
/// <reference types="vitest" />
import * as path from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'
import svgLoader from 'vite-svg-loader'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': path.resolve('src')
}
},
build: {
lib: {
entry: {
main: path.resolve(__dirname, './src/index.ts'),
'components/index': path.resolve(__dirname, './src/components/index.ts'),
'composables/index': path.resolve(__dirname, './src/composables/index.ts'),
'colors/index': path.resolve(__dirname, './src/colors/index.ts')
}
},
rollupOptions: {
external: ['vue', '@headlessui/vue', '@floating-ui/vue', '@vueuse/core', 'tabbable'],
output: {
globals: {
vue: 'Vue'
},
exports: 'named'
}
}
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['vitest.setup.ts']
},
plugins: [
vue(),
dts({
tsconfigPath: './tsconfig.build.json'
}),
svgLoader({
svgo: false
})
]
})