-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
49 lines (47 loc) · 1.23 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
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath } from 'node:url'
import { resolve } from 'node:path'
import dts from 'vite-plugin-dts'
export default defineConfig({
plugins: [vue(), dts({ tsconfigPath: 'tsconfig.build.json', cleanVueFileName: true })],
test: {
environment: 'jsdom',
root: fileURLToPath(new URL('./', import.meta.url)),
globals: false
},
build: {
minify: true,
modulePreload: false,
cssMinify: 'lightningcss',
copyPublicDir: false,
assetsDir: '',
lib: {
entry: resolve(import.meta.dirname, 'src/index.ts'),
name: 'mindenitUI',
fileName: 'ui'
},
rollupOptions: {
external: ['vue', '@iconify/vue', '@internationalized/date', '@vueuse/core', 'vee-validate'],
output: {
globals: {
vue: 'Vue',
'@internationalized/date': '@internationalized/date',
'vee-validate': 'vee-validate',
'@iconify/vue': '@iconify/vue',
'@vueuse/core': '@vueuse/core'
},
assetFileNames: (chunkInfo) => {
if (chunkInfo.name === 'style.css') return 'index.css'
return chunkInfo.name as string
}
}
}
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})