Closed stepanh closed 7 years ago
enabled by default
It should be, of course! :astonished: I'll take a look tonight. What platform are you on?
cheers :-)
macOS, Node 6.5.0, Chrome
Works for me, on Ubuntu though with Node 6.2.1. Can you try the v2
branch? It's basically same as master
minus the Windows compatibility fixes.
I tried both development and production modes, client side rendering worked on both. There is some network activity when navigating trough the “blog” but those are just data fetches.
I'll re-open this when I get more information to work from :)
I have the same issue
Running locally gives a first 404 error in console on
GET http://localhost:3000/app.js 404 (Not Found)
However, once the page is loaded, I can access http://localhost:3000/app.js and see the full script.
Chrome on macOS, node v6.3.1
Extra info:
[webpack-isomorphic-tools] [error]
.development()method is now deprecated (for server-side instance only, not for webpack plugin instance) and has no effect. Set up a proper
process.env.NODE_ENVvariable instead.
Thanks for the details!
Not sure those issues are related but it's something I should look at either way. The deprecation warning is easy to fix, just remove the .development(...)
line. It relies on NODE_ENV
already anyway.
Could you try that and see if it solves the client-side script issues too? Otherwise I will take a look in the weekend.
I've removed the .development line in /bin/server but the problem is still there.
What's strange is that in my chrome I get GET http://localhost:3000/app.js 404 (Not Found)
, but once the page is loaded the same get works correctly.
I found out the issue is related to changes in webpack-dev-middleware
1.8.0... my bad probably, since it's not made for Koa.
While I figure out how to make it work again with Koa I suggest:
"webpack-dev-middleware": "1.7.0"
By the way, this is somewhat related (it will fix the root cause of this issue, which is the workaround needed to make Webpack dev middleware work with Koa) and might be an interesting thread to follow - webpack/webpack-dev-middleware#111
The problem seems to be that the middleware serves the bundle correctly but with a 404 status code. I "fixed" it in webpack.server.js adding:
if (mockResponse) { res.statusCode = 200 }
here is the full file https://gist.github.com/Truji92/1e598ceab3c967d2dbed140ec739483d
Maybe is a ugly fix, but it's working... haha
I pinned webpack-dev-middleware
to1.7.0
on master for now, so closing this issue. Need more time to look into the real issue anyway 😁
You say 'client-side rendering is an enhancement', but I think I'm not the only one who would appreciate it to be enabled by default.
Right now, clicking through blog, every page gets server re-rendered.
Keep up the good work ;-)