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

feat(core): support custom dependency type internally #3068

Merged
merged 1 commit into from
May 9, 2023

Conversation

hyf0
Copy link
Collaborator

@hyf0 hyf0 commented May 9, 2023

Related issue (if exists)

#3051

Summary

  • In most cases Cow<'static, str> would be &'static str behind, so clone would be not a problem.
  • This also makes Rspack could support custom dependency type from the js side in the future.

馃 Generated by Copilot at 22eff06

Added custom dependency types to rspack_core and refactored dependency and module logic. Changed dependency_type arguments to use clone instead of dereferencing to avoid copying.

Walkthrough

馃 Generated by Copilot at 22eff06

  • Add Custom variant to DependencyType enum and use borrow::Cow for string values (link, link, link)
  • Update dependency_type field and arguments to use clone instead of dereferencing, since DependencyType is no longer Copy (link, link, link)
  • Move normal_module_factory.rs to dependency/mod.rs and refactor dependency logic to separate module (link)

@hyf0 hyf0 requested a review from underfin May 9, 2023 05:50
@hyf0 hyf0 requested a review from h-a-n-a as a code owner May 9, 2023 05:50
@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature labels May 9, 2023
@hyf0 hyf0 enabled auto-merge May 9, 2023 07:19
@hyf0 hyf0 added this pull request to the merge queue May 9, 2023
Merged via the queue into main with commit 6fd8265 May 9, 2023
15 checks passed
@hyf0 hyf0 deleted the hyf_sjioasjiojdoqwoijeiqowj branch May 9, 2023 09:44
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.

None yet

2 participants