-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.pro.config.js
51 lines (50 loc) · 1.38 KB
/
vite.pro.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
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
import { bg3SpellBuildPlugin } from './src/plugin/index.js';
import { ViteMinifyPlugin } from 'vite-plugin-minify'
import path from 'path';
export default defineConfig({
plugins: [
bg3SpellBuildPlugin(),
VitePWA({
injectRegister:null,
includeAssets:['*.webp','c.svg'],
manifest: {
name: 'Baldur\'s Gate 3 - Spells and Passives',
short_name: 'BG3 Spells',
description: 'List of all spells and Passives in Baldur\'s Gate 3。Also provides command codes for adding and removing Spells and Passives.',
theme_color: '#0a0c17',
background_color:"#241c10",
icons: [
{
src: 'i192.webp',
sizes: '192x192',
type: 'image/webp'
},
{
src: 'i512.webp',
sizes: '512x512',
type: 'image/webp'
}
]
}
}),
ViteMinifyPlugin({})
],
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index.html'),
registerSW: path.resolve(__dirname, 'src/registerSW.js'),
},
output:{
entryFileNames:({name})=>{
if('registerSW'===name)return '[name].js'
return '[name]-[hash].js'
},
assetFileNames:'[name]-[hash].[ext]'
}
},
minify: true
}
});