Skip to content

Commit

Permalink
Serve Redoc in a dedicated chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaBardou authored and Archaeopteryx committed Sep 5, 2023
1 parent 30e4491 commit 6b95fb0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,21 @@ const productionConfig = {
chunks: 'all',
maxInitialRequests: 5,
name: false,
cacheGroups: {
redoc: {
test: /[\\/]node_modules[\\/](mobx|redoc|styled-components)[\\/]/,
name: 'redoc',
chunks: 'all',
},
},
},
runtimeChunk: 'single',
},

performance: {
hints: 'error',
maxAssetSize: 1782579.2,
maxEntrypointSize: 2621440,
maxAssetSize: 2200000,
maxEntrypointSize: 3000000,
},

plugins: [
Expand All @@ -250,7 +257,7 @@ const productionConfig = {
lang: 'en',
meta: false,
filename: 'index.html',
chunks: ['index'],
chunks: ['index', 'redoc'],
}),
new MiniCssExtractPlugin({
filename: 'assets/[name].[contenthash:8].css',
Expand Down

0 comments on commit 6b95fb0

Please sign in to comment.