title: Fixing Webpack's Watch Option
body: <p>I had code that worked just fine, but now I've updated some packages, especially webpack, and I'm getting some warnings that I'd like to remove.</p>
  <p>When I run the command <code>npm run watch</code>, I get the following error:</p>
  <p><code>[DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] DeprecationWarning: A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.</code></p>
  <p>My <code>package.json</code> is as follows:</p>
  <pre><code>{
      &quot;name&quot;: &quot;simple-flask-react-template&quot;,
      &quot;version&quot;: &quot;1.0.0&quot;,
      &quot;description&quot;: &quot;&quot;,
      &quot;main&quot;: &quot;index.js&quot;,
      &quot;scripts&quot;: {
          &quot;build&quot;: &quot;webpack -p --progress --config webpack.config.js&quot;,
          &quot;dev-build&quot;: &quot;webpack --progress -d --config webpack.config.js&quot;,
          &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
          &quot;watch&quot;: &quot;webpack --progress -d --config webpack.config.js --watch&quot;
      },
      &quot;author&quot;: &quot;jadiker&quot;,
      &quot;license&quot;: &quot;None&quot;,
      &quot;homepage&quot;: &quot;https://github.com/rbarbaresco/simple-flask-react-template#readme&quot;,
      &quot;devDependencies&quot;: {
          &quot;babel-core&quot;: &quot;^6.26.3&quot;,
          &quot;babel-loader&quot;: &quot;^7.1.5&quot;,
          &quot;babel-preset-env&quot;: &quot;^1.7.0&quot;,
          &quot;babel-preset-react&quot;: &quot;^6.24.1&quot;,
          &quot;bootstrap&quot;: &quot;^4.2.1&quot;,
          &quot;css-loader&quot;: &quot;^2.1.0&quot;,
          &quot;file-loader&quot;: &quot;^3.0.1&quot;,
          &quot;jquery&quot;: &quot;^3.5.1&quot;,
          &quot;popper.js&quot;: &quot;^1.14.7&quot;,
          &quot;react&quot;: &quot;^16.7.0&quot;,
          &quot;react-dom&quot;: &quot;^16.7.0&quot;,
          &quot;webpack&quot;: &quot;^5.11.1&quot;,
          &quot;webpack-cli&quot;: &quot;^3.3.10&quot;
      },
      &quot;babel&quot;: {
          &quot;presets&quot;: [
              &quot;env&quot;,
              &quot;react&quot;
          ]
      },
      &quot;dependencies&quot;: {
          &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.28&quot;,
          &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.13.0&quot;,
          &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.9&quot;,
          &quot;query-string&quot;: &quot;^6.11.1&quot;,
          &quot;react-router-dom&quot;: &quot;^5.1.2&quot;
      }
  }
  </code></pre>
  <p>My <code>webpack.config.js</code> is as follows:</p>
  <pre><code>const webpack = require('webpack');
  const config ={
      mode: 'development',
      entry: {
          login: './js/login.jsx',
          signup: './js/signup.jsx',
          index: './js/index.jsx',
          search: './js/search.jsx',
          ask: './js/ask.jsx',
          question: './js/question.jsx',
          help: './js/help.jsx',
          test: './js/test.jsx',
      },
      devtool: 'inline-source-map',
      output: {
          path: __dirname + '/dist/bundle',
          filename: '[name].bundle.js',
      },
      resolve:{
          extensions:[
              '.js',
              '.jsx',
              '.css'
          ]
      },
      module:{
          rules:[
              {
                  test:/\.jsx?/,
                  exclude:/node_modules/,
                  use:'babel-loader'
              },
              {
                  test:/\.(jpe?g|png|gif|svg)$/i,
                  loader:&quot;file-loader&quot;,
              },
              {
                  test:/\.css$/,
                  use:[
                      'css-loader'
                  ],
  
              },
  
          ]
      }
  };
  
  
  module.exports = config;
  </code></pre>
  <p><strong>What can I change in the code in order to get that warning to go away?</strong></p>