Skip to content

Commit

Permalink
Fix build js file size issue
Browse files Browse the repository at this point in the history
  • Loading branch information
h0ngcha0 committed Jul 22, 2024
1 parent 7cb0d85 commit 5807e75
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/extension/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ module.exports = {
chunks(chunk) {
return chunk.name === 'main';
},
minSize: 2000000,
maxSize: 4000000,
cacheGroups: {
tsxFiles: {
test: /\.tsx?$/,
Expand All @@ -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,
Expand Down

0 comments on commit 5807e75

Please sign in to comment.