Anyone have any experience converting a react app created with create-react-app
to using server side rendering and code splitting via loadable-components
? I know this is a general question, but mostly looking for general guidance or any major red flags for this approach. I'd like to keep the nice things you get out of box with create-react-app
- especially the live reload dev environment - while adding in optimizations using SSR and code splitting. I was able to mostly get this working using express
backend and handlebars
templating, but I'm facing many challenges getting code splitting working correctly with this setup. Any hints / stories are appreciated!
Asked
Active
Viewed 937 times
0

Murcielago
- 1,030
- 1
- 14
- 24
1 Answers
0
There is craco "an easy and comprehensible configuration layer for create-react-app".
Webpack custom configurations go into craco.config.js
, inside root folder.
SSR is possible, you can check two related questions that might help you with your case:
Code splitting loads all chunk files on chrome but load them separately in firefox
Loadable Components SSR - chunkNames in Server Stats file different from Client stats file

Nicolas Hevia
- 15,143
- 4
- 22
- 31