I've started to use webpack not so long ago. Everything's perfect and React hot loading works great. But there's one this with webpack dev server that I cannot understand. When I use my webapp issues endless requests to /app/info. And it gets back 404.
What is this? How can I turn it off?
Here's the log in console:
And here's my config (it's pretty much generic config for the React hot loading):
const webpack = require('webpack');
const path = require('path');
const autoprefixer = require('autoprefixer');
module.exports = {
entry: [
'webpack-dev-server/client',
'bootstrap-loader',
'./src/app.js',
],
output: {
path: path.join(__dirname, '..', 'resources', 'static', 'app'),
filename: 'app.js',
publicPath: '/app',
},
devServer: {
headers:
{
'Access-Control-Allow-Origin': 'http://localhost:10000',
'Access-Control-Allow-Credentials': 'true',
},
},
// devtool: '#source-map',
resolve: { extensions: ['', '.js'] },
plugins: [
new webpack.NoErrorsPlugin(),
],
module: {
loaders: [
{
test: /\.(js)$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel-loader?presets[]=es2015,' +
'presets[]=react,' +
'presets[]=stage-0,' +
'plugins[]=' + path.join(__dirname, 'babelRelayPlugin') + ',' +
'plugins[]=transform-runtime,' +
'plugins[]=transform-object-rest-spread'],
},
{ test: /\.css$/, loaders: ['style', 'css', 'postcss'] },
{ test: /\.scss$/, loaders: ['style', 'css', 'postcss', 'sass'] },
{
test: /\.(woff2?(\?v=[0-9]\.[0-9]\.[0-9])?|png|jpg)$/,
loader: 'url?limit=25000',
},
{
test: /\.(ttf|eot|svg)(\?[\s\S]+)?$/,
loader: 'file',
},
// Use one of these to serve jQuery for Bootstrap scripts:
// Bootstrap 4
{ test: /bootstrap\/dist\/js\/umd\//, loader: 'imports?jQuery=jquery' },
// Bootstrap 3
{ test: /bootstrap-sass\/assets\/javascripts\//, loader: 'imports?jQuery=jquery' },
],
},
postcss: [autoprefixer],
};
This comment fixed my issue https://github.com/webpack/webpack-dev-server/issues/326#issuecomment-171344167. I changed 'webpack-dev-server/client',
to 'webpack-dev-server/client?http://localhost:8080/',