-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
50 lines (49 loc) · 1.09 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
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import { resolve } from 'path'
import vue from '@vitejs/plugin-vue'
import viteCompression from 'vite-plugin-compression'
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig({
resolve: {
alias: {
'@moonicon/svg': resolve(__dirname, 'packages/moonicon-svg'),
'@moonicon/vue': resolve(__dirname, 'packages/moonicon-vue'),
'@moonicon/util': resolve(__dirname, 'packages/moonicon-util')
}
},
plugins: [
vue(),
viteCompression({
verbose: true,
disable: false,
threshold: 10240,
algorithm: 'gzip',
ext: '.gz',
deleteOriginFile: false
}),
AutoImport({
imports: ['vitest'],
dts: true
})
],
build: {
outDir: 'moonicon',
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue'
}
}
},
lib: {
entry: resolve(__dirname, 'packages/moonicon-vue3/src/index.ts'),
formats: ['es']
}
},
test: {
globals: true,
environment: 'jsdom'
}
})