Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unpkg was down briefly today (3/15), which caused the entire website to break. Migrating to local React assets would fix similar issues in the future.
However, there are many potential downsides to this:
As an alternative, we could still have the React assets stored locally as a back-up in case this ever happens again—we'd always hit the unpkg CDN endpoint first, and only use local files if that fails. (We'd need to look into how to do this check and fallback.) This would give benefits of using an external CDN as well as the back-up in case it goes down.
We can also probably look into other CDNs if this becomes another issue in the future, though again it is unlikely, since many other production servers also use the unpkg CDN.
Ideally, with this talk of CDNs, it'll be a lot better for our Heroku servers to offload all static assets (i.e. all of the compiled javascript files) to an external endpoint (see AWS Cloudfront, which caches S3 files). This would require some code changes and would incur an additional cost—we'd need to get an estimate by looking through the logs, but we'll likely fall under the free tier for CloudFront (the first 10 million requests and 1TB data transfer per month is free), and the amount of data we store is very little, so S3 costs would also be small too.