-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
61 lines (58 loc) · 1.35 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
51
52
53
54
55
56
57
58
59
60
61
import vue from '@vitejs/plugin-vue';
import {defineConfig} from 'vite';
import {resolve} from 'path';
import viteCompression from 'vite-plugin-compression';
import {nodePolyfills} from 'vite-plugin-node-polyfills';
export default defineConfig({
server: {
host: '0.0.0.0',
port: 5678,
strictPort: true,
open: false,
},
define: {
'process.env': {NODE_ENV: 'production'}
},
plugins: [
vue(),
viteCompression({
algorithm: 'gzip',
ext: '.gz',
threshold: 2048,
deleteOriginFile: false,
verbose: true
}),
nodePolyfills()
],
resolve: {
alias: {
'@': resolve(__dirname, 'core')
}
},
clearScreen: false,
json: {
namedExports: true,
stringify: false
},
build: {
outDir: 'dist',
target: 'modules',
minify: false,
manifest: false,
assetsDir: 'assets',
cssCodeSplit: false,
assetsInlineLimit: 4096,
chunkSizeWarningLimit: 500,
reportCompressedSize: false,
rollupOptions: {
external: ['canvg']
},
lib: {
name: 'apiDesign',
entry: {
index: 'index.ts'
},
formats: ['es', 'umd'],
}
}
});