-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use dynamic-cdn-webpack-plugin for react and react-dom #3914
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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.CDNModules
to 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-precache
to cache the files from cdn?