Closed Industrial closed 6 years ago
Hi!
In this repo I am trying to get a simple app working with SSR, HMR and the new Webpack 4 and Babel 7 (and TypeScript with that).
Right now I'm stuck on this error: TypeError: serverRenderer is not a function at node_modules/webpack-hot-server-middleware/src/index.js:13:3.
TypeError: serverRenderer is not a function at node_modules/webpack-hot-server-middleware/src/index.js:13:3
Somehow my webpack compiler object is not emitting a 'done' event, and the server renderer is never fetched.
To reproduce:
git clone https://github.com/Inuldustrial/universal-demo; cd universal-demo; npm i; npm run start;
You will see the complete webpack config, a successful compile and that error in the browser when you visit the page.
Thanks for your time,
Tom
I think it's due to the new hooks API.
Yeah, found it.
In webpack-dev-middleware it's already implemented here.
webpack-dev-middleware
I've created a PR at https://github.com/60frames/webpack-hot-server-middleware/pull/64
Hi!
In this repo I am trying to get a simple app working with SSR, HMR and the new Webpack 4 and Babel 7 (and TypeScript with that).
Right now I'm stuck on this error:
TypeError: serverRenderer is not a function at node_modules/webpack-hot-server-middleware/src/index.js:13:3
.Somehow my webpack compiler object is not emitting a 'done' event, and the server renderer is never fetched.
To reproduce:
You will see the complete webpack config, a successful compile and that error in the browser when you visit the page.
Thanks for your time,
Tom