From 415dfa65808f1984d9219a4f9f0f553d7d36ae7b Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Sun, 22 Dec 2024 22:45:29 +0000 Subject: [PATCH] webpack: don't precache .DS_Store in sw.js --- webpack.config.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 2123704..c99cebf 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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'), }, -}*/]; \ No newline at end of file +}*/];