Open chrishutchinson opened 8 years ago
Hi @chrishutchinson,
I have not tried server side rendering in the current version. Would be interested in this, too. We are currently looking into giving the generator the possibility to use ssr. Have a look at https://github.com/weblogixx/react-webpack-template/issues/41 for the current status of this.
Hey folks,
I have a simple
generator-react-webpack
project I'd like to server-side render.Given Webpack is bundling the entire app into a single file (including my
ReactDOM.render(<App />, document.getElementById('app'));
line), I can't useReactDOMServer.renderToString()
becausedocument
isn't defined.This app is going to be served statically, and so I'll be writing a simple node script to generate the HTML and store it somewhere (e.g. S3).
Any suggestions on how best to do this, given the webpack config in this generator, would be appreciated.
Thanks!