Uh oh!
There was an error while loading. Please reload this page.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it work when the app is cached using service worker and the network is offline? IMO this needs to be opt-in if we want to move forward with it
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a decision the maintainers should take. we already discussed the key motivations in #2758. @gaearon and others are in favor of using CDNs in general, but I understand your concern.
as far as SW and CRA are concerned I know we are moving towards making them opt-in: #2554. its an easier call there because its just commenting out one line of code. but still. we're moving away from it for now.
IMO CRA should cater to the 90% use case as we always have eject as an option. thats what its for. as far as i understand it, service workers are not in the 90% use case for CRA (this is why we keep getting so many issues about it)
as a last resort: if we really want to we can check for something like
process.env.CDNModulesto opt out of it for build.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea but if people chose to opt-in for SW, it broke their expectation because the created app is no longer working offline.. I think it should be a choice between cdn capable vs offline capable. Or maybe we can configure
sw-precacheto cache the files from cdn?