Do you have two NPM script commands in your package.json that use the same Webpack config file but want them to behave slightly differently from each other? Creating a whole new config file with the exact 160 lines of code + 20 more lines is definitely not the right approach.
In this video, we show you how to set up the config file to accept a boolean argument — this would tell the production config file whether or not we wanted to deploy the build to our server.
Credit to our Software Developer: Raphael Setin
To read more about this or learn about Webpack best practices, make sure to check our Webpack Tips blog post: https://jayconsystems.com/blog/top-3-...