Javascript WDS断开连接!在网页上
我的应用程序出现WDS断开错误 在webpack.config.js上Javascript WDS断开连接!在网页上,javascript,reactjs,webpack,Javascript,Reactjs,Webpack,我的应用程序出现WDS断开错误 在webpack.config.js上 entry: { App: [ 'webpack-dev-server/client?https://127.0.0.0:3001', 'webpack/hot/only-dev-server', './src/index.js' ] }, devServer: { inline: true, port: 3001, historyAp
entry: {
App: [
'webpack-dev-server/client?https://127.0.0.0:3001',
'webpack/hot/only-dev-server',
'./src/index.js'
]
},
devServer: {
inline: true,
port: 3001,
historyApiFallback: true,
contentBase: __dirname + '/public/',
disableHostCheck: true,
},
关于package.json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack-dev-server --hot --host 0.0.0.0"
},
我在nginx上使用proxypass,请求被发送到
如果我删除端口号,如
我可以看到一些文本,但端口号会转到错误页面
在nginx设置上
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
我做错什么了吗