Updated webpack config to cleanup warnings

no refs

`yarn build` used to throw up a lot of warnings because the webpack config was not correctly updated to use performance config for portal's usecase, this change -

- Sets the `mode` to explicit `production` instead of implicit which throws a warning
- Updated performance max* sizes to account for a single portal chunk bundled up as an external script
This commit is contained in:
Rish 2021-02-23 01:12:58 +05:30
parent c73e80e1fb
commit 1868542504

View File

@ -2,6 +2,7 @@ const path = require('path');
const glob = require('glob');
module.exports = {
mode: 'production',
entry: {
'bundle.js': glob.sync('build/static/?(js|css)/main.*.?(js|css)').map(f => path.resolve(__dirname, f))
},
@ -17,5 +18,10 @@ module.exports = {
}
]
},
plugins: []
plugins: [],
performance: {
hints: false,
maxEntrypointSize: 560,
maxAssetSize: 5600
}
};