Skip to content

Commit b98b505

Browse files
committed
fix: 🐞 解决打包失败问题
1 parent 21ecc33 commit b98b505

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web/build/plugins.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ const createVitePwa = (viteEnv: ViteEnv): PluginOption | PluginOption[] => {
132132
const { VITE_GLOB_APP_TITLE } = viteEnv;
133133
return VitePWA({
134134
registerType: "autoUpdate",
135+
workbox: {
136+
// 添加此项配置,增加需要缓存的最大文件大小
137+
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024
138+
},
135139
manifest: {
136140
name: VITE_GLOB_APP_TITLE,
137141
short_name: VITE_GLOB_APP_TITLE,

0 commit comments

Comments
 (0)