-
-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
1,142 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
pub mod provide_for_shared_dependency; | ||
pub mod provide_shared_dependency; | ||
pub mod provide_shared_module; | ||
pub mod provide_shared_module_factory; | ||
pub mod provide_shared_plugin; | ||
pub mod share_runtime_module; |
46 changes: 46 additions & 0 deletions
46
crates/rspack_core/src/mf/sharing/provide_for_shared_dependency.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
use crate::{ | ||
AsContextDependency, AsDependencyTemplate, Dependency, DependencyCategory, DependencyId, | ||
DependencyType, ModuleDependency, | ||
}; | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct ProvideForSharedDependency { | ||
id: DependencyId, | ||
request: String, | ||
} | ||
|
||
impl ProvideForSharedDependency { | ||
pub fn new(request: String) -> Self { | ||
Self { | ||
id: DependencyId::new(), | ||
request, | ||
} | ||
} | ||
} | ||
|
||
impl Dependency for ProvideForSharedDependency { | ||
fn dependency_debug_name(&self) -> &'static str { | ||
"ProvideForSharedDependency" | ||
} | ||
|
||
fn id(&self) -> &DependencyId { | ||
&self.id | ||
} | ||
|
||
fn dependency_type(&self) -> &DependencyType { | ||
&DependencyType::ProvideModuleForShared | ||
} | ||
|
||
fn category(&self) -> &DependencyCategory { | ||
&DependencyCategory::Esm | ||
} | ||
} | ||
|
||
impl ModuleDependency for ProvideForSharedDependency { | ||
fn request(&self) -> &str { | ||
&self.request | ||
} | ||
} | ||
|
||
impl AsContextDependency for ProvideForSharedDependency {} | ||
impl AsDependencyTemplate for ProvideForSharedDependency {} |
Oops, something went wrong.