Tag: react hot loader

使用react-hot-loader v3和webpack-hot-middleware时,error development没有定义错误

鉴于这些是我正在使用的依赖关系: "react-hot-loader": "3.0.0-beta.7", "webpack": "2.6.1", "webpack-dev-middleware": "^1.11.0", "webpack-hot-middleware": "^2.18.1", "webpack-merge": "^4.1.0" 错误 patch.js:5 Uncaught ReferenceError: development is not defined at Object.defineProperty.value (patch.js:5) at __webpack_require__ (bootstrap 921586e…:659) at fn (bootstrap 921586e…:85) at Object.options.path (patch.js:1) at __webpack_require__ (bootstrap 921586e…:659) at fn (bootstrap 921586e…:85) at Object.<anonymous> (process-update.js:132) at __webpack_require__ (bootstrap 921586e…:659) at validateFormat (bootstrap 921586e…:708) at bootstrap 921586e…:708 […]

使用react-hot-loader 3与自己的服务器

我能够设置react-hot-loader来正确地绑定我的客户端js,并将更改推送到浏览器并在那里应用(除了[react-router] You cannot change <Router routes>; it will be ignored警告)。 我使用自己的服务器与koa , koa-webpack-dev-middleware和koa-webpack-hot-middleware ,处理webpack和hot。 它也处理我的应用程序与此代码的服务器呈现 export default function *renderReact() { const history = createMemoryHistory(); const store = makeStore(history); const [redirectLocation, renderProps] = yield match.bind(null, { routes, location: this.url, history }); if (redirectLocation) { return this.redirect(redirectLocation.pathname + redirectLocation.search) } if (renderProps == null) { return this.throw(404, […]

WebSocket连接失败。 在WebSocket握手期间错误 – socketjs

细节: 我一直在试图将我的反应项目configuration为使用hot loader以便我可以在不必重新启动服务器的情况下进行积极的开发。 每当websocket尝试连接时,我都会收到一个连续的错误消息: WebSocket connection to 'ws://192.168.33.10/sockjs-node/301/eo4p2zps/websocket' failed: Error during WebSocket handshake: Unexpected response code: 404 。 我的直觉告诉我,这可能与我运行Ubuntu -v 14.04.3 VM(stream浪者) 14.04.3 。 除了上面logging的错误,我得到: http://192.168.33.10/sockjs-node/629/s0dz3nxv/xhr_streaming?t=1482558136743 404 (Not Found) http://192.168.33.10/sockjs-node/629/jbjciaga/eventsource 404 (Not Found) http://192.168.33.10/sockjs-node/iframe.html 404 (Not Found) http://192.168.33.10/sockjs-node/629/e1x0l01e/xhr?t=1482558137388 404 (Not Found) Warning: [react-router] Location "/sockjs-node/629/dr44jysd/htmlfile?c=_jp.ajy5ad3" did not match any routes client?e2df:41 [WDS] Disconnected! Uncaught SyntaxError: […]