From 5807e750d041924343d77acf2dee09e74a0a12c0 Mon Sep 17 00:00:00 2001 From: h0ngcha0 Date: Mon, 22 Jul 2024 10:57:46 +0200 Subject: [PATCH] Fix build js file size issue --- packages/extension/webpack.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/extension/webpack.config.js b/packages/extension/webpack.config.js index 6d7e8d5a..0fba56eb 100644 --- a/packages/extension/webpack.config.js +++ b/packages/extension/webpack.config.js @@ -153,6 +153,8 @@ module.exports = { chunks(chunk) { return chunk.name === 'main'; }, + minSize: 2000000, + maxSize: 4000000, cacheGroups: { tsxFiles: { test: /\.tsx?$/, @@ -164,6 +166,16 @@ module.exports = { priority: -5, reuseExistingChunk: true }, + react: { + test: /[\\/]node_modules[\\/](react)[\\/]/, + priority: -10, + reuseExistingChunk: true + }, + alephium: { + test: /[\\/]node_modules[\\/](@alephium)[\\/]/, + priority: -10, + reuseExistingChunk: true + }, defaultVendors: { test: /[\\/]node_modules[\\/]/, priority: -10,