From aee4a7542858053bd481e9f32fee18b587cd6072 Mon Sep 17 00:00:00 2001 From: lishuang Date: Sun, 12 Jul 2020 00:02:47 +0800 Subject: [PATCH] Remove the service worker. --- config/webpack.config.js | 18 ------------------ package.json | 3 +-- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/config/webpack.config.js b/config/webpack.config.js index e65def4..df2df36 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -665,24 +665,6 @@ module.exports = function (webpackEnv) { // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // You can remove this if you don't use Moment.js: new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), - // Generate a service worker script that will precache, and keep up to date, - // the HTML & assets that are part of the webpack build. - isEnvProduction && - new WorkboxWebpackPlugin.GenerateSW({ - clientsClaim: true, - exclude: [/\.map$/, /asset-manifest\.json$/], - importWorkboxFrom: "cdn", - navigateFallback: paths.publicUrlOrPath + "index.html", - navigateFallbackBlacklist: [ - // Exclude URLs starting with /_, as they're likely an API call - new RegExp("^/_"), - // Exclude any URLs whose last part seems to be a file extension - // as they're likely a resource and not a SPA route. - // URLs containing a "?" character won't be blacklisted as they're likely - // a route with query params (e.g. auth callbacks). - new RegExp("/[^/?]+\\.[^/]+$"), - ], - }), // TypeScript type checking useTypeScript && new ForkTsCheckerWebpackPlugin({ diff --git a/package.json b/package.json index 2c283ec..9bb79ad 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,6 @@ "url-loader": "2.3.0", "webpack": "4.42.0", "webpack-dev-server": "3.10.3", - "webpack-manifest-plugin": "2.2.0", - "workbox-webpack-plugin": "4.3.1" + "webpack-manifest-plugin": "2.2.0" } }