From 920a49823aafbf29b8a87a033568ba43e6ebfe92 Mon Sep 17 00:00:00 2001 From: skedwards88 Date: Sun, 29 Oct 2023 17:22:22 -0700 Subject: [PATCH] use cacheID for service worker --- webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index a9d3e03..6b1af37 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ const path = require("path"); const WorkboxPlugin = require("workbox-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const CopyPlugin = require("copy-webpack-plugin"); +const packageJson = require("./package.json") module.exports = (env, argv) => { if (argv.mode === "development") { @@ -68,6 +69,7 @@ module.exports = (env, argv) => { clientsClaim: true, skipWaiting: true, maximumFileSizeToCacheInBytes: 4200000, // special case to cache word list for offline play + cacheId: packageJson.version, }); const plugins =