From bf9fd2dee8bf87ad4cd5bf8903d3d51ceb1206a3 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 10 Feb 2022 18:05:09 -0600 Subject: [PATCH] Chunk out jslib and large modules to separate caches (#2331) * Chunk out jslib and large modules to separate caches * It's sufficient to just extract maps from the source (cherry picked from commit f4bf8b2e1d3deadb04fb781c9f36551cdce3a01d) --- webpack.config.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index bc4e9945f0..7c901c83ab 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -83,9 +83,6 @@ const plugins = [ { from: "./src/content/autofill.css", to: "content" }, ], }), - new webpack.SourceMapDevToolPlugin({ - include: ["popup/main.js", "background.js"], - }), new MiniCssExtractPlugin({ filename: "[name].css", chunkFilename: "chunk-[id].css", @@ -110,7 +107,7 @@ const plugins = [ const config = { mode: ENV, - devtool: false, + devtool: ENV === "development" ? "eval-source-map" : "source-map", entry: { "popup/polyfills": "./src/popup/polyfills.ts", "popup/main": "./src/popup/main.ts", @@ -124,7 +121,7 @@ const config = { "notification/bar": "./src/notification/bar.js", }, optimization: { - minimize: false, + minimize: true, splitChunks: { cacheGroups: { commons: {