Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 无法在文件更改时重新加载Web包热客户端_Webpack_Webpack Hmr_Webpack Hot Client - Fatal编程技术网

Webpack 无法在文件更改时重新加载Web包热客户端

Webpack 无法在文件更改时重新加载Web包热客户端,webpack,webpack-hmr,webpack-hot-client,Webpack,Webpack Hmr,Webpack Hot Client,由于某些原因,我无法使网页包热加载程序工作。我就是这样使用它的: const bodyParser=require('body-parser')) const cors=require('cors') const express=require('express') const webpack=require('webpack') const webpackDevMiddleware=require('webpack-dev-middleware') const webpackHotClien

由于某些原因,我无法使
网页包热加载程序
工作。我就是这样使用它的:

const bodyParser=require('body-parser'))
const cors=require('cors')
const express=require('express')
const webpack=require('webpack')
const webpackDevMiddleware=require('webpack-dev-middleware')
const webpackHotClient=require('webpack-hot-client')
const config=require('config')
const errorOnHtml=require('scripts/utils/httpServer/errorOnHtml')
const path=require('scripts/utils/path')
const runEntrypoint=require('scripts/utils/runEntrypoint')
const trackRequest=require('scripts/utils/httpServer/azureAppInsights')
const webpackDevMiddlewareConfig=require('config/webpackMiddleware/dev'))
const{webpackDevelopClientConfig}=require('config/webpack')
const webpackCompiler=webpack(webpackDevelopClientConfig)
webpackHotClient(webpackCompiler)
常量httpServerConfig=express()
httpServerConfig
.使用(
webpackDevMiddleware(
网页包编译器,
{
公共路径:(
WebPackageDevelopPClientConfig
.公共道路
),
}
)
)
.all('*',runEntrypoint('app.server'))

module.exports=()=>httpServerConfig
似乎我需要设置一个自定义端口

此处未显示连接到此Express实例的另一个WebSocket服务器。如果不指定自定义端口,webpack热客户端似乎无法正常工作