vite: precache images for pwa
This commit is contained in:
parent
4734a67f5a
commit
c06d8b8c11
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,7 @@ export default defineConfig(({ mode }) => {
|
|||
strategies: "injectManifest",
|
||||
registerType: "autoUpdate",
|
||||
devOptions: {
|
||||
enabled: !["production", "staging"].includes(mode),
|
||||
enabled: true,
|
||||
},
|
||||
srcDir: "src/serviceworker",
|
||||
filename: "main.ts",
|
||||
|
@ -84,6 +84,9 @@ export default defineConfig(({ mode }) => {
|
|||
pwaAssets: {
|
||||
config: true,
|
||||
},
|
||||
injectManifest: {
|
||||
globPatterns: ["**/*.{js,wasm,css,html,svg,png,ico}"],
|
||||
},
|
||||
}),
|
||||
version(),
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue