webpack: don't precache .DS_Store in sw.js (#64)

This commit is contained in:
Olivier Chafik 2024-12-22 22:50:04 +00:00 committed by GitHub
commit a779976038
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,7 +47,12 @@ module.exports = [{
'process.env.NODE_ENV': 'development',
}),
...(process.env.NODE_ENV === 'production' ? [
new WorkboxPlugin.GenerateSW({
new WorkboxPlugin.GenerateSW({
exclude: [
/\.map$/,
/^manifest.*\.js$/,
/.*?\.DS_Store$/,
],
// these options encourage the ServiceWorkers to get in there fast
// and not allow any straggling "old" SWs to hang around
swDest: path.join(__dirname, "dist", 'sw.js'),
@ -103,4 +108,4 @@ module.exports = [{
filename: 'sw.js',
path: path.resolve(__dirname, 'dist'),
},
}*/];
}*/];