geelen / react-snapshot

A zero-configuration static pre-renderer for React apps
MIT License
1.66k stars 104 forks source link

Support load scripts when using PUBLIC_URL env #103

Open oHaiyang opened 6 years ago

oHaiyang commented 6 years ago

We are deploying our site to a CDN service by using the PUBLIC_URL feature of the create-react-app project. But we got stuck when taking a snapshot, react-snapshot cannot load scripts when they are located under a third-party domain. This pull request interprets the loading process of scripts under PUBLIC_URL domain to load local scripts instead.