Open bazzel opened 5 years ago
I don't have a real strong opinion on this, but I slightly prefer having everything in 1 file as long as there are not too many conditions / differences between environments.
I've seen Webpack configurations that were split up in a handful of files, which IMO makes it pretty hard to grasp what the configuration as a whole is doing.
On the web I see different approaches how to deal with settings that depend on the environment (dev, prod) the application is running in. Some use 1
webpack.config.js
and useif
statements to apply the proper settings, others define common settings inwebpack.config.js
, define env. specific ones in i.e.webpack.dev.js
and merge these intowebpack.config.js
(the exact application may vary).Maji uses the
if
variant, but I'm wondering what's the reason behind this? Of course this may be historical, but it looks like the webpack docs use the latter one.