Open philipeatela opened 4 years ago
sorry i abandoned react-snap as it was breaking my pages and i couldn't figure out why. i'm now using next.js for new projects as it builds static pages and hydrates them.
Sorry, why do we need cdn support for a pre-rendering package? doesn't placing the static files itself on a cdn solve this?
Well the issue is that CDNs work differently, for example: Firebase worked perfectly with react-snap's standard outputs, however when I tried to host the same files on AWS Cloudfront it did not work as expected. So the idea here would be adding a config that allows the user to specify how he/she wants the files to be outputted (For example: instead of outputting pages to page-name/index.html
we might want to output to page-name.html
.
Right I understand.
I am using a static file server which will 1) first look for index.html 2) fall back to 404.html 3) for nested folders I have the option to also look for index.html <-- this works well with react-snap, but it ads a trailing '\' .. and so far I have not had an issue with it.
But I do agree with your file naming strategy as a option to pass in the config.
By the way have you looked at 11ty with your project, I assumed it did not work as well as react-snap?
Yep!
I actually don't know 11ty, the other options I looked at was react-snapshot (and react-static).
i don't think 11ty is something you can add on to create-react-app. rather you have to switch from create-react-app to 11ty, like next.js or gatsbyjs.
A lot of users had been working on several approaches to making react-snap work better with different CDNs. If we could get your input @stereobooster @kirkchris @jayenashar
We should probably discuss this a bit further before merging in code to deal with this, the starting point would be the latest discussions on this:
https://github.com/stereobooster/react-snap/issues/92 https://github.com/stereobooster/react-snap/pull/136 https://github.com/stereobooster/react-snap/pull/179