Precache config and theme manifest

This commit is contained in:
RMidhunSuresh 2022-05-18 15:42:49 +05:30
parent 660a08db3e
commit 7426d17e33

View file

@ -37,7 +37,7 @@ export default defineConfig(({mode}) => {
// important this comes before service worker
// otherwise the manifest and the icons it refers to won't be cached
injectWebManifest("assets/manifest.json"),
injectServiceWorker("./src/platform/web/sw.js", ["index.html"], {
injectServiceWorker("./src/platform/web/sw.js", ["index.html", "assets/config.json", "assets/theme-element.json"], {
// placeholders to replace at end of build by chunk name
index: {
DEFINE_GLOBAL_HASH: definePlaceholders.DEFINE_GLOBAL_HASH,