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

collectTimeInfoEntries does not consider case-sensitivity initially #228

Open
JonnyBurger opened this issue Jan 15, 2023 · 0 comments
Open

Comments

@JonnyBurger
Copy link

The following example is case-sensitive!

Given a file b.tsx:

export default () => <div>ABCDEF</div>

Being imported in a.tsx with the wrong casing:

import B from './B';

export default () => {
  return <B/>
}

Will result in Fast refresh working once, but not twice. This behavior can also be seen in Next.JS, reproduction here: https://github.com/JonnyBurger/watchpack-bug-repro To reproduce, Change the content in Hello.tsx twice.

If a file is imported with the uppercase filename, the watcher will still be registered on the lowercase filename. If the collectTimeInfoEntries function is called, the time info entries for the uppercase names are requested, but they are not in the map and null is returned. Somewhere else in Webpack this leads to the module not being invalidated because null has a meaning of the file not existing at all.

Sending a PR for this!

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

No branches or pull requests

1 participant