-
Notifications
You must be signed in to change notification settings - Fork 52
/
vite.config.js
46 lines (42 loc) · 1.17 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
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
/**
* Vite is used to build the UI for the dashboard,
* is is not used for the nodes themselves.
*/
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js'
}
},
plugins: [vue(),
VitePWA({
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.js',
registerType: 'autoUpdate',
injectRegister: false,
manifest: false,
injectManifest: {
maximumFileSizeToCacheInBytes: 3000000,
globPatterns: ['**/*.{js,css,html,svg,png,ico,ttf,eot,woff,woff2}']
},
devOptions: {
enabled: false,
navigateFallback: 'index.html',
suppressWarnings: true,
type: 'module'
}
})
],
root: 'ui',
build: {
minify: process.env.NODE_ENV === 'development' ? false : undefined,
outDir: '../dist',
emptyOutDir: true
},
base: './'
})