title: How to set mode to development or production in the config file?
body: <p>We are migrating to webpack 4. We do have dev / prod config files already. We started getting this warning message:</p>
  
  <pre><code>WARNING in configuration
  The 'mode' option has not been set. Set 'mode' option to 'development' 
  or 'production' to enable defaults for this environment.
  </code></pre>
  
  <p>We can get around this by passing --mode production in the cmdline like below:</p>
  
  <pre><code>npm run webpack --mode development ...
  </code></pre>
  
  <p>As is mentioned on the webpack documentation, blog and everywhere else on the internet. How can we set the config in the config file? Simply putting a mode: development under modules won't work. Just a bit frustrated why the documentation is just missing...</p>