build(webpack): bundle size optimization for lodash (#6244)
* add duplicate code detection check for general purpose use * webpack alias for lodash * redux and react-redux dependency bump that removes lodash dependencies * lodash version match with swagger-client and recent security update * additional webpack config to help reduce build sizes * restore max bundle size back to 1024000
This commit is contained in:
@@ -118,8 +118,9 @@ export default function buildConfig(
|
||||
// these aliases make sure that we don't bundle same libraries twice
|
||||
// when the versions of these libraries diverge between swagger-js and swagger-ui
|
||||
alias: {
|
||||
"@babel/runtime-corejs2": path.resolve(__dirname, '..', 'node_modules/@babel/runtime-corejs2'),
|
||||
"js-yaml": path.resolve(__dirname, '..', 'node_modules/js-yaml')
|
||||
"@babel/runtime-corejs2": path.resolve(__dirname, "..", "node_modules/@babel/runtime-corejs2"),
|
||||
"js-yaml": path.resolve(__dirname, "..", "node_modules/js-yaml"),
|
||||
"lodash": path.resolve(__dirname, "..", "node_modules/lodash")
|
||||
},
|
||||
},
|
||||
|
||||
@@ -133,8 +134,8 @@ export default function buildConfig(
|
||||
|
||||
performance: {
|
||||
hints: "error",
|
||||
maxEntrypointSize: 1073152, // 1048 KiB,
|
||||
maxAssetSize: 1073152,
|
||||
maxEntrypointSize: 1024000,
|
||||
maxAssetSize: 1024000,
|
||||
},
|
||||
|
||||
optimization: {
|
||||
|
||||
Reference in New Issue
Block a user