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

fix: make sure injected imports will be processed by whatever comes next #129

Merged
merged 1 commit into from
Jun 27, 2020

Conversation

pmmmwh
Copy link
Owner

@pmmmwh pmmmwh commented Jun 27, 2020

This fix ensures injected dependencies via loaders will get picked up and wrapped/processed by whatever transform is coming next (Babel/TS/etc). This is important in some scenarios (e.g. dependency-related helpers with caching behaviour) and will help maintain referential equality across hot updates for the "family" reference generated by react-refresh/runtime. This also makes sure when dependencies are being mangled/wrapped in other loaders, our injected ones will be processed too, so it ensures that only on version of a dependency can be used.

Fixes #120

@pmmmwh pmmmwh added the bug Something isn't working label Jun 27, 2020
@pmmmwh pmmmwh self-assigned this Jun 27, 2020
@pmmmwh pmmmwh merged commit e6769ea into main Jun 27, 2020
@pmmmwh pmmmwh deleted the fix/dependency-equality branch June 27, 2020 19:15
pmmmwh added a commit that referenced this pull request Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hot reloading does not work with @babel/plugin-transform-modules-commonjs
1 participant