-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
65 lines (50 loc) · 1.69 KB
/
vite.config.js
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
62
63
64
65
import { defineConfig } from 'vite' // import vite.js
import vue from '@vitejs/plugin-vue' // import vite-vue-plugin
import svgLoader from 'vite-svg-loader' // import vite-svg-loader
import rollupCommand from 'rollup-plugin-command' // import rollup-plugin command
// vite.js configuration (see https://vitejs.dev/config)
export default defineConfig({
// define base-url for build (can also be done via commandline - vite build --base=/fluxguide/public/fluxguide-core-app/dist/)
base: './',
// dev server options
server: {
host: "0.0.0.0",
port: 3000,
open: true
},
// build options
build: {
// define output foldername
outDir: 'dist',
// all CSS in the entire project will be extracted into a single CSS file
cssCodeSplit: false,
// Vite will empty the outDir on build
emptyOutDir: true,
// disable brotli-compressed size reporting
brotliSize: false,
// Limit for chunk size warnings (in kbs)
chunkSizeWarningLimit: 10000,
// rollup options
rollupOptions: {
// // remove hashes from filenames
// output: {
// chunkFileNames: "assets/[name].js",
// assetFileNames: "assets/[name][extname]",
// entryFileNames: "assets/[name].js"
// }
}
},
// define plugins
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: tag => tag === 'lottie-player'
}
}
}), // vue-plugin
svgLoader(), // svg-loader plugin
// rollup-plugin command (will be fired after build)
rollupCommand(`node ./src/runAfterBuild.js`)
]
})