Skip to content

Commit

Permalink
webpack: don't precache .DS_Store in sw.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ochafik authored Dec 22, 2024
1 parent f3cb9ae commit 415dfa6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -103,4 +108,4 @@ module.exports = [{
filename: 'sw.js',
path: path.resolve(__dirname, 'dist'),
},
}*/];
}*/];

0 comments on commit 415dfa6

Please sign in to comment.