fix: disable caching of assets for the development server #1307
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.
Summary:
It looks like the built assets get cached sometimes causing issues such as facebook/react-native#28844
This might happen if the HTML file got cached, but there's a new version available with different links.
It's better to disable the caching altogether since the development server is run locally and caching files causes more problems than it helps.
Normally it's possible by developers to disable caching when devtools is open, but it's not reasonable to expect everyone to do it.
The commit changes 2 things:
Fixes #1081
Test Plan:
I have tested this in a fresh React Native project following the instructions in CONTRIBUTING.md and observed that the debugger works as expected.
cc @brentvatne