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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: before resolve can't modify data #3352

Merged
merged 7 commits into from
May 31, 2023
Merged

Conversation

IWANABETHATGUY
Copy link
Contributor

@IWANABETHATGUY IWANABETHATGUY commented May 30, 2023

Related issue (if exists)

Closed #3320

Summary

馃 Generated by Copilot at 71c1bf0

This pull request adds the ability to modify the request string of module dependencies, which can affect how they are resolved by different plugins. It implements a set_request method for various dependency types that implement the ModuleDependency trait, and passes the request string to the module graph and the module factory. It also adds a new dependency type for dynamic imports in ESM modules, which is not fully implemented yet.

Walkthrough

馃 Generated by Copilot at 71c1bf0

  • Add a new dependency type for dynamic imports in ESM modules (link)
  • Add a set_request method to the ModuleDependency trait and its implementations (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Modify the NormalModuleFactory to pass a mutable reference to the data parameter to the before_resolve hook (link, link)
  • Add a set_request method to the ModuleGraphModuleDependency struct (link)

@github-actions github-actions bot added release: bug fix team The issue/pr is created by the member of Rspack. labels May 30, 2023
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review May 31, 2023 06:31
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue May 31, 2023
Merged via the queue into main with commit 8ebf614 May 31, 2023
17 checks passed
@IWANABETHATGUY IWANABETHATGUY deleted the fix/before_resolve branch May 31, 2023 08:57
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.

NormalModuleFactory beforeResolve hook doesn't obey modified resolveData
2 participants