title: configuration.devtool should match pattern "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$"
body: <p>I am migrating <code>webpack 4</code> to <code>webpack 5</code>.</p>
  <p><code>config/webpack.js</code> has:</p>
  <p>`devtool: isProduction ? 'hidden-source-map' : 'cheap-module-eval-source-map'</p>
  <p>after migration got error:</p>
  <blockquote>
  <p>onfiguration.devtool should match pattern &quot;^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$&quot;.</p>
  </blockquote>
  <p>It looks like the new <code>webpack</code> don't like conditions, because if I change to:</p>
  <p><code>devtool: 'hidden-source-map'</code></p>
  <p>error is gone.</p>