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: HMR scanner should only visit dependencies related to HMR #2911

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Apr 24, 2023

Related issue (if exists)

closes #2910

Summary

🤖 Generated by Copilot at 05c9443

This pull request enhances the JavaScript HMR dependency scanning logic in rspack_plugin_javascript and improves the error handling in rspack_core by using more advanced AST traversal methods and providing more informative panic messages.

Walkthrough

🤖 Generated by Copilot at 05c9443

  • Improve error message for invalid dependency in NormalModuleFactory (link)
  • Use fields module from swc_core crate in hmr_scanner.rs (link)
  • Use visit_with_path method for first argument of call expression in HmrScanner (link)

@h-a-n-a h-a-n-a requested a review from underfin April 24, 2023 13:41
@h-a-n-a h-a-n-a requested review from ahabhgk and hyf0 as code owners April 24, 2023 13:41
@changeset-bot
Copy link

changeset-bot bot commented Apr 24, 2023

⚠️ No Changeset found

Latest commit: 05c9443

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added release: bug fix team The issue/pr is created by the member of Rspack. labels Apr 24, 2023
@h-a-n-a h-a-n-a changed the title fix: fix hmr scanner fix: HMR scanner should only visit dependencies related to HMR Apr 24, 2023
@h-a-n-a h-a-n-a enabled auto-merge April 24, 2023 15:03
@h-a-n-a h-a-n-a added this pull request to the merge queue Apr 25, 2023
Merged via the queue into main with commit b0fdf82 Apr 25, 2023
@h-a-n-a h-a-n-a deleted the fix/hmr-scanner branch April 25, 2023 03:05
siyou pushed a commit to siyou/rspack that referenced this pull request May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR not working with nested string literals
2 participants