-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
🙋 feature request: built-in SSR for using bundler middleware #737
Comments
The problem with this request is that Parcel is not specific to react. So we must design our features in a generic way that considers all possible frameworks. That being said, if there is a way to have parcel enable this in a generic way so that e.g. plugins could implement SSR for react and other frameworks, that would be awesome. Let's figure out what that looks like. |
Just would like to add that for SSR to be useful, it is quite complicated. It must:
And |
FWIW Rogue does this with Parcel+React. |
I've also recently released https://github.com/DeMoorJasper/blazingly which is an experiment to create a universal and powerfull SSR server and cli tool for parcel (in the future blazingly will be stable and extendable) I've also been chatting with the maintainer of Rogue on how to write Rogue as a blazingly extension |
@DeMoorJasper i think there is a problem doing boilerplates or boilerplated-tools all the time.
|
@Stoffern I was actually thinking of rewriting certain parts of blazingly to make it extendable, probably similar to how other SSR projects are doing it. My main worry about supporting everything is that I dont's want to make the install gigantic, which is quite a bad thing, definitely as I'd like to make blazingly usable in production eventually (which isn't really possible if the install is ginormous, def on small cloud based servers). |
take a look at https://github.com/velop-io/server then |
ssr
option that, when enabled, renders React components into their including .html files, callinggetInitialProps({req})
before rendering a la next.jsrender
method on assets ifssr: true
render
method toHTMLAsset
that traverses linked assets, finds occurrences ofReactDOM.render/createPortal
in JS/JSX files, and usesReactDOMServer
to render to a string and replace the contents of the HTML.See also: #355
The text was updated successfully, but these errors were encountered: