sPavl0v / react-spa-prenderer

MIT License
34 stars 17 forks source link

Have routes loaded asynchronously. #24

Open aayusharyan opened 1 year ago

aayusharyan commented 1 year ago

I have a situation where I have the paths json file which is being generated dynamically during build time. I don't want to make it the config file. So, I am thinking of a way to load the config from some part and the path from another path.

My proposal is that add a way to set config using a js file which can either contain a synchronous funtcion to return the complete config object or a promise to be executed asynchronously.

For reference, something similar to - https://github.com/prisma-archive/prep?tab=readme-ov-file#example-prepjs

Any thoughts?