title: Webpack 5 dev server does not reload on file changes
body: <p>I'm very new to webpack so please be indulgent but I can't figure out why it is not reloading the page when a modification is detected. With some old version of webpack just running webpack-dev-server was enough but with these latest versions I can't get there.</p>
  <p>Here is my config :</p>
  <pre><code>const path = require('path')
   
  module.exports = {
      entry: './src/index.js',
      output: {
          path: path.resolve(__dirname, 'public/scripts'),
          filename: 'bundle.js'
      },
      module: {
          rules: [
            {
              test: /\.m?js$/,
              exclude: /node_modules/,
              use: {
                loader: 'babel-loader',
                options: {
                  presets: [
                    ['@babel/preset-env']
                  ]
                }
              }
            }
          ]
      },
      target: ['web', 'es5'],
      devServer: {
        contentBase: path.resolve(__dirname, 'public'),
        watchContentBase: true
      },
      devtool: 'source-map'
  }
  </code></pre>
  <p>Here is my script :</p>
  <pre><code>&quot;scripts&quot;: {&quot;dev&quot;: &quot;webpack serve --mode=development&quot;}
  </code></pre>
  <p>versions I'm running :</p>
  <pre><code>&quot;webpack&quot;: &quot;^5.11.0&quot;,
  &quot;webpack-cli&quot;: &quot;^4.3.0&quot;,
  &quot;webpack-dev-server&quot;: &quot;^3.11.0&quot;
  </code></pre>
  <p>thank you for your help</p>