Closed andredarcie closed 3 years ago
Specifying them in the cache
object in package.json should work
{
"dependencies": {
// ...
},
//...
"cache": {
"swDest": "service-worker.js",
"globPatterns": ["**/*.{html,js,css,jpg,png,wav.mp3}"]
}
//...
}
I added it to the package.json file and now it works! Thank you!
"cache": {
"disablePlugin": false,
"inDev": true,
"strategy": "default",
"importWorkboxFrom": "local",
"globPatterns": [
"**/*.{html,js,css,jpg,png,wav,mp3,mpeg,ttf}"
]
},
How to add other types of files to globPatterns and change the default behavior?
Today the default cofiguration only supports this file types, how to chance and add sounds files like .wav and .mp3
globPatterns: ["**/*.{html,js,css,jpg,png}"],