-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Middleware + HtmlWebpackPlugin usage quirk. #142
Comments
The |
Also, it seems like you're including the |
I have checked, I don't have |
Ran into the same issue while trying to add SSR into react-boilerplate based setup. |
When dev middleware is used with HtmlWebpackPlugin and in conjunction with server side rendering it leads to a very tricky setup.
Since
index.html
is processed and emitted into Webpack's output by HTML plugin, dev middleware picks it up despite the flagserverSideRender: true
, because the file exists and it could be served and the middleware chain stops on that w/o a call to rendering middleware.I have found a weird solution to it: I changed
index
option to something non-existent so that dev middleware is not able to find it in memory fs and passes control to next middleware:With this setup I can use HTML plugin's output and put Redux state and rendered HTML into it.
It works OK, but looks a bit awkward, so maybe something could be done to make it look more pretty.
The text was updated successfully, but these errors were encountered: