Is there a way to create a react app with server side rendering without using express js as server or Next.js for example?
Can I just use webpack to do server side rendering?
Is there a way to create a react app with server side rendering without using express js as server or Next.js for example?
Can I just use webpack to do server side rendering?
You must have express or any language http server setup to host your files if you ever want to have this app live regardless if you want to have SSR or not.
https://survivejs.com/webpack/output/server-side-rendering/
This guide should help you out with webpack and express
If you really need static rendered files from react durring webpack build, look at this plugin: https://github.com/thread/react-static-render-plugin/
In production, the JS output for SSR needs to be required by node with expressjs or other web frameworks. Or you can use FaaS(Azure Function, AWS Lambda) to require that JS output to perform SSR
In development, you can have a try this webpack plugin. It reuses webpack-dev-server response dynamic html based on request parameter
It has two examples from simple react app to advanced react-relay app