globPatterns
First added
Workbox
Default
["**/*.{js,css,html}"]
About
Files matching any of these patterns will be included in the precache manifest. For more information, see glob’s Glob Primer.
Usage
await injectManifest({
swSrc: "app/sw.ts",
swDest: "dist/sw.js",
globDirectory: "dist/static",
globPatterns: ["**/*.{js,css,html,png,webmanifest,json}"],
});