Skip to content

How to set precache prefix name whit workboxPluginMode: 'InjectManifest' #14978

Discussion options

You must be logged in to vote

Found this solution: in custom-service-worker.js

import { clientsClaim,cacheNames, setCacheNameDetails } from 'workbox-core'
import { precacheAndRoute, cleanupOutdatedCaches, createHandlerBoundToURL } from 'workbox-precaching'
import { registerRoute, NavigationRoute } from 'workbox-routing'

setCacheNameDetails({
prefix: 'myapp',
suffix: 'v8',
precache: 'precache',
runtime: 'run-time',
googleAnalytics: 'ga',
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gaguerrero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant