Sometimes we want to run non-minimized builds in production to help debug inconsistent issues. Webpack config as such: config.optimization.minimize = false;.
react-app-rewired allows us to do webpack config modification in config-overrides.js, but the only argument we can pass in from the package.json scripts is env. We could do npm run build --env=production-without-minimize but that'd mess with our env-specific build logic within the codebase too.
We should find a way to pass in arguments, or even just have a separate script, for building production without minimization.
Sometimes we want to run non-minimized builds in production to help debug inconsistent issues. Webpack config as such:
config.optimization.minimize = false;
.react-app-rewired
allows us to do webpack config modification inconfig-overrides.js
, but the only argument we can pass in from thepackage.json
scripts isenv
. We could donpm run build --env=production-without-minimize
but that'd mess with our env-specific build logic within the codebase too.We should find a way to pass in arguments, or even just have a separate script, for building
production
without minimization.