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 f4bf8b2e1d
)
This commit is contained in:
parent
ee68d01cac
commit
bf9fd2dee8
|
@ -83,9 +83,6 @@ const plugins = [
|
||||||
{ from: "./src/content/autofill.css", to: "content" },
|
{ from: "./src/content/autofill.css", to: "content" },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
new webpack.SourceMapDevToolPlugin({
|
|
||||||
include: ["popup/main.js", "background.js"],
|
|
||||||
}),
|
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "[name].css",
|
filename: "[name].css",
|
||||||
chunkFilename: "chunk-[id].css",
|
chunkFilename: "chunk-[id].css",
|
||||||
|
@ -110,7 +107,7 @@ const plugins = [
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
mode: ENV,
|
mode: ENV,
|
||||||
devtool: false,
|
devtool: ENV === "development" ? "eval-source-map" : "source-map",
|
||||||
entry: {
|
entry: {
|
||||||
"popup/polyfills": "./src/popup/polyfills.ts",
|
"popup/polyfills": "./src/popup/polyfills.ts",
|
||||||
"popup/main": "./src/popup/main.ts",
|
"popup/main": "./src/popup/main.ts",
|
||||||
|
@ -124,7 +121,7 @@ const config = {
|
||||||
"notification/bar": "./src/notification/bar.js",
|
"notification/bar": "./src/notification/bar.js",
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: true,
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
commons: {
|
commons: {
|
||||||
|
|
Loading…
Reference in New Issue