Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7878e38
feat(mf): emit layered federation manifest metadata
ScriptedAlchemy Jul 22, 2026
d695f80
Merge remote-tracking branch 'origin/codex/mf-layered-container-expos…
ScriptedAlchemy Jul 27, 2026
104779a
Merge commit 'c0f445d991' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
ce88369
Merge commit 'f16f215f1f' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
047855f
Merge commit '7ee51282af' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
436c0ec
Merge commit '6c1af2cc11' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
adf874a
Merge commit '1c3eb0545a' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
c97347a
perf(mf): patch shared exports without typed manifests
ScriptedAlchemy Jul 27, 2026
5414c43
Merge commit 'bce2884445' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
641e8bd
perf(mf): compact manifest ordering paths
ScriptedAlchemy Jul 27, 2026
10d5251
Merge commit '53b1f7eab9' into codex/work-pr14913
ScriptedAlchemy Jul 27, 2026
34cbbbb
Merge commit 'b21cf1d6ee' into codex/work-pr14913
ScriptedAlchemy Jul 28, 2026
26d39dc
Merge commit 'b1722dc0b8' into codex/work-pr14913
ScriptedAlchemy Jul 28, 2026
c1dc269
Merge commit '4f1eef5126' into codex/work-pr14913
ScriptedAlchemy Jul 28, 2026
d5a6cd8
fix(mf): match metadata-aware shared fallbacks
ScriptedAlchemy Jul 28, 2026
aaa5e5d
Merge commit '27771aaf0a' into codex/work-pr14913
ScriptedAlchemy Jul 28, 2026
4b12fb5
Merge commit '9c461fabfb' into codex/work-pr14913
ScriptedAlchemy Jul 28, 2026
4273f15
Merge commit '84a127a87a' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
1fc82e2
Merge commit '1a74f7d954' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
60dbda7
fix(mf): preserve layered manifest usage
ScriptedAlchemy Jul 29, 2026
eec50cb
Merge commit 'c20131b8f4' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
07d03e7
Merge commit 'aa1d9ec633' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
ba3cbe8
Merge commit '668cfeeea5' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
4fb4161
Merge commit 'bfa3a15559' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
3a5d15d
Merge commit '3dee67eda1' into codex/work-pr14913
ScriptedAlchemy Jul 29, 2026
86f2304
fix(mf): match effective expose layers
ScriptedAlchemy Jul 29, 2026
4a6870c
Merge remote-tracking branch 'origin/codex/mf-layered-container-expos…
ScriptedAlchemy Jul 29, 2026
f993885
fix(mf): match multi-import expose layers
ScriptedAlchemy Jul 29, 2026
7815b4e
Merge remote-tracking branch 'origin/codex/mf-layered-container-expos…
ScriptedAlchemy Jul 29, 2026
49de987
Merge remote-tracking branch 'origin/codex/mf-layered-container-expos…
ScriptedAlchemy Jul 29, 2026
61096f0
fix(mf): adapt structured export fallback
ScriptedAlchemy Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/node_binding/napi-binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2631,12 +2631,15 @@ export interface RawLimitChunkCountPluginOptions {
export interface RawManifestExposeOption {
path: string
name: string
layer?: string
}

export interface RawManifestSharedOption {
name: string
version?: string
requiredVersion?: string
shareScope?: string | Array<string>
layer?: string
singleton?: boolean
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ pub struct RawRemoteAliasTarget {
pub struct RawManifestExposeOption {
pub path: String,
pub name: String,
pub layer: Option<String>,
}

#[derive(Debug)]
Expand All @@ -408,6 +409,8 @@ pub struct RawManifestSharedOption {
pub name: String,
pub version: Option<String>,
pub required_version: Option<String>,
pub share_scope: Option<Either<String, Vec<String>>>,
pub layer: Option<String>,
pub singleton: Option<bool>,
}

Expand Down Expand Up @@ -466,6 +469,7 @@ impl From<RawModuleFederationManifestPluginOptions> for ModuleFederationManifest
.map(|expose| ManifestExposeOption {
path: expose.path,
name: expose.name,
layer: expose.layer,
})
.collect(),
shared: value
Expand All @@ -476,6 +480,11 @@ impl From<RawModuleFederationManifestPluginOptions> for ModuleFederationManifest
name: shared.name,
version: shared.version,
required_version: shared.required_version,
share_scope: shared.share_scope.map_or_else(
|| ShareScope::Single("default".to_string()),
into_share_scope,
),
layer: shared.layer,
singleton: shared.singleton,
})
.collect(),
Expand Down
43 changes: 43 additions & 0 deletions crates/rspack_plugin_mf/src/manifest/data.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use serde::{Deserialize, Serialize};

use crate::ShareScope;

#[derive(Debug, Serialize, Clone, Default)]
pub struct StatsAssetsGroup {
#[serde(default)]
Expand Down Expand Up @@ -35,19 +37,42 @@ pub struct StatsExpose {
pub file: String,
pub id: String,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<String>,
#[serde(default)]
pub requires: Vec<String>,
#[serde(
default,
rename = "requiredShared",
skip_serializing_if = "Vec::is_empty"
)]
pub required_shared: Vec<StatsSharedRequirement>,
#[serde(default)]
pub assets: StatsAssetsGroup,
}

#[derive(Debug, Serialize, Clone, PartialEq, Eq)]
pub struct StatsSharedRequirement {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<String>,
#[serde(rename = "shareScope", skip_serializing_if = "Option::is_none")]
pub share_scope: Option<ShareScope>,
}

#[derive(Debug, Serialize, Clone)]
pub struct StatsShared {
pub id: String,
#[serde(rename = "identityId", skip_serializing_if = "Option::is_none")]
pub identity_id: Option<String>,
pub name: String,
pub version: String,
#[serde(default)]
pub requiredVersion: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<String>,
#[serde(rename = "shareScope", skip_serializing_if = "Option::is_none")]
pub share_scope: Option<ShareScope>,
#[serde(default)]
pub singleton: Option<bool>,
#[serde(default)]
Expand Down Expand Up @@ -112,18 +137,36 @@ pub struct ManifestExpose {
pub id: String,
pub name: String,
pub path: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<String>,
#[serde(
default,
rename = "requiredShared",
skip_serializing_if = "Vec::is_empty"
)]
pub required_shared: Vec<StatsSharedRequirement>,
pub assets: StatsAssetsGroup,
}

#[derive(Debug, Serialize, Clone)]
pub struct ManifestShared {
pub id: String,
#[serde(rename = "identityId", skip_serializing_if = "Option::is_none")]
pub identity_id: Option<String>,
pub name: String,
pub version: String,
#[serde(default)]
pub requiredVersion: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub layer: Option<String>,
#[serde(rename = "shareScope", skip_serializing_if = "Option::is_none")]
pub share_scope: Option<ShareScope>,
#[serde(default)]
pub singleton: Option<bool>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub usedExports: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub referenceExports: Vec<String>,
#[serde(default)]
pub assets: StatsAssetsGroup,
}
Expand Down
Loading
Loading