refactor(ServerRendering) simpler server rendering assets #471
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a problem with Sprockets 3.
lib/assets/react-source/{ production | development }
to the asset pipeline//= require react
works for production build or development buildproduction/react-server
instead ofreact-server
(Server-side rendering is not working with sprockets-rails 3.0 #443 (comment))logical_path
has changed!)Why does it do that?! I don't know. But I think this is a chance to simplify the default server rendering setup.
Right now, we require
["react-server.js", "components.js"]
. Becausereact-server
is "automatic", it's a bit hidden. I think we should add a new file calledserver_rendering.js
which includes those two files. This is good because:react-server.js
becomes a public API (I'm using this for my app already, I needrenderToString
)However, this introduces some breaking changes:
server_rendering.js
manifestTODO: