-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
59 lines (58 loc) · 1.43 KB
/
Copy pathvite.config.js
File metadata and controls
59 lines (58 loc) · 1.43 KB
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
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
base: '/webmmd/',
plugins: [
VitePWA({
registerType: 'autoUpdate',
injectRegister: 'inline',
devOptions: {
enabled: true,
suppressWarnings: true
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,wasm,env}'],
globIgnores: ['sw.js'],
maximumFileSizeToCacheInBytes: 25 * 1024 * 1024, // Babylon.js & Havok WASM用に上限を引き上げ (25MB)
},
manifest: {
name: "webmmd",
short_name: "webmmd",
description: "ブラウザ上で MMD モデルを表示・再生",
start_url: "/webmmd/",
scope: "/webmmd/",
display: "standalone",
background_color: "#0b1118",
theme_color: "#0b1118",
lang: "ja",
icons: [
{
src: "icons/icon-192.svg",
sizes: "192x192",
type: "image/svg+xml",
purpose: "any maskable"
},
{
src: "icons/icon-512.svg",
sizes: "512x512",
type: "image/svg+xml",
purpose: "any maskable"
}
]
}
})
],
optimizeDeps: {
include: ['babylon-mmd']
},
server: {
allowedHosts: ['.ts.net'],
hmr: {
clientPort: 443
}
},
build: {
assetsInlineLimit: 0,
chunkSizeWarningLimit: 2000
}
});