I'm having some error using HotModuleReplacement. I can't use it actually, it says that __webpack_hmr
is not found.
In /node_modules/webpack-hot-middleware/client.js
I have this configuration by default:
/*eslint-env browser*/
/*global __resourceQuery __webpack_public_path__*/
var options = {
path: "/__webpack_hmr",
timeout: 20 * 1000,
overlay: true,
reload: false,
log: true,
warn: true
};
But I don't have a '__webpack_hmr' under my basedir. Where it suposses to be located that, is a file? I'm pretty confused, trying to use Brosersync, webpack, HMR. I'm just testing some React Admin Panel, I already asked to the author on Github without response. Please help.
This is part of my webpack config:
entry: [
'./src/webpack-public-path',
'webpack-hot-middleware/client?reload=true',
'./src/index'
],
target: 'web',
output: {
path: `${__dirname}/src`,
publicPath: '/',
filename: 'bundle.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
__DEV__: true
}),
new webpack.HotModuleReplacementPlugin(), etc...
Some topics like Webpack hmr: __webpack_hmr 404 not found provides solutions that have no sense, plus aren't like my case.
I'm using Cluod9 IDE, so I don't have a localhost, I have to define the host by hand somewhere.