forked from dannvix/COSCUP_Agenda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mjs
41 lines (40 loc) · 1.01 KB
/
vite.config.mjs
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue2'
import basicSSL from '@vitejs/plugin-basic-ssl'
export default defineConfig(async ({ mode }) => {
return {
build: {
rollupOptions: {
input: {
'index': 'index.html',
'service_worker': 'src/service_worker.js',
},
output: {
// do not generate hashes (for sw)
entryFileNames: '[name].js',
chunkFileNames: '_chunks/[name].js',
assetFileNames({name}) {
if (name == 'index.css') return 'style.css'
// sw must be at root
return '[name][extname]'
},
},
},
assetsInlineLimit: 0,
},
plugins: [
basicSSL(),
vue({
template: {
compilerOptions: {
whitespace: 'preserve',
// for accessing globalThis in module context
inline: true,
},
},
}),
],
envPrefix: 'COSCUP_AGENDA_',
clearScreen: false,
}
})