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.
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
fix(gatsby): show @hot-loader installation prompt #26927
fix(gatsby): show @hot-loader installation prompt #26927
Changes from 11 commits
a4d9f7b
ddec8df
584ef9d
17e317b
e7bdb9a
fb9d5a1
0e0903f
4e33603
2fd3363
4d32e4f
371f68c
07fcab8
a7515e2
821c9ec
6dfa297
fb7acc3
453ffad
3a23739
b1faac3
4a55fa5
0a21e3c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
@hot-loader/react-dom
has versions starting from16.7.0
. Technically we support^16.4.2
so the warning is not actionable for users on react versions between those 2 - worth silencing the warning if version is below 16.7? There are no hooks there anyway (assuming this is only needed for hooks support)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.
I'll do 16.8.0 because that's when hooks are a thing and you'll only need it for hooks.
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.
I don't know specific details but
React 16.6+ features may not work.
from the error/warning message implies it's not just hooks? (or maybe message is just not updated - not sure if I remember correctly but hooks were expected to land in 16.7 but didn't)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.
Improved semver checks. These are all the patches that they have needed to do https://github.com/gaearon/react-hot-loader/blob/master/src/webpack/patch.js
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.
patch
part doesn't need to match?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.
it's not available for every patch version of react so that's the reason why I didn't do 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.
What will happen when there is version mismatch between
react
and@hot-loader/react-dom
(given that patch is not available for everything, I guess we could limit question to different minor versions)?I guess the behaviour itself is undefined - but would users see any warnings about this (that's going from the messaging here that major and minor should be the same for those 2 packages)?
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.
I've added an extra warning to the code, in my tests if your version is higher I haven't found any immediate issue but of course, there are probably some subtle changes.