title: Webpack dev server - Not allowed to load local resource
body: <p>I'm using webpack-dev-server in order to develop a React app on windows.</p>
  
  <p>When running the command: <code>webpack-dev-server --config webpack/webpack.dev.js</code>, 
  then going to localhost, I'm getting an error message for the js file (the bundled one): </p>
  
  <p><code>Not allowed to load local resource: file:///C:/Dev/react-starter/dist/main.js</code> </p>
  
  <p>I'm not fully familiar with webpack-dev-server, but didn't get a sense about why this can happen even from the docs and the GH issues.</p>
  
  <p>my config looks like: </p>
  
  <pre><code>var path = require('path');
  var WebpackDashboard = require('webpack-dashboard');
  var HtmlWebpackPlugin = require('html-webpack-plugin');
  
  var srcFolder   = path.resolve(__dirname, '../src');
  var buildFolder = path.resolve(__dirname, '../dist'); 
  var publicFolder = path.resolve(__dirname, '../assets');
  
  module.exports = { 
      target: 'web',
      entry: './index.js',
      context: srcFolder,
      devtool: 'source-map',
  
      output: {
          path: buildFolder,
          publicPath: path.resolve(__dirname, '../dist/'),        
          filename: '[name].js',
          chunkFilename: '[name].chunk.js',
  
      },
  
      resolve: {
          extensions: ['.js', '.jsx', '.json', '.scss'],
          alias: {
              '@': srcFolder,
          }
      },
  
      module: {
          rules: [
              {
                  test: /\.(js|jsx)/,
                  loader: 'babel-loader',
                  exclude: /node_modules/
              },
              {
                  test: /\.scss$/,
                  use: [
                      { loader: 'style-loader' },
                      { loader: 'css-loader' },
                      { loader: 'sass-loader' },
                  ]
              }
          ]
      },
  
      plugins: [
          new HtmlWebpackPlugin({
              inject: 'body',
              template: path.resolve(__dirname, '../src/index.html'),
          }),
      ],
  
      devServer: {
          contentBase: path.join(__dirname, '../dist'),
          port: 4464,
          hot: true,
          publicPath: buildFolder,
      }
  
  }
  </code></pre>
  
  <p>Hope someone can help. Tnx!</p>