Skip to content
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

Implement fix for Fast Refresh bug #229

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JonnyBurger
Copy link

Fixes the bug described in #228.

Verified by checking that the example posted in the original issue works now, null is not returned, and by adding a test that failed before the fix.

@JonnyBurger
Copy link
Author

Just noticed that a test is failing and am a bit lost on how this could be correctly fixed..

There is a test that asserts that getTimeInfoEntries should not have files with invalid names in their map. However Webpack relies on it here:

https://github.com/webpack/webpack/blob/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/FileSystemInfo.js#L2102-L2105

In this code snippet, getting the file timestamps for a file with wrong casing returns null, which is neither undefined nor ignore and therefore the module does not get invalidated.
Maybe this should be fixed on Webpack side instead?

Need some help in figuring out what the right way to approach it is, until then I need to pause on this issue.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is the valid fix, some OS has case-insensitive logic, same case-sensivity, it should be under an option (or we should check it using node.js API, not sure we can check it). Why your files have different cases, it is a not good practice (even more - there are plugins and rules for linter to prevent such things). But I agree it should be considered as a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants