Skip to content

Commit 82dee4e

Browse files
committed
chore(enhanced): update schema
1 parent 37346d4 commit 82dee4e

File tree

2 files changed

+87
-4
lines changed

2 files changed

+87
-4
lines changed

.changeset/curvy-ducks-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
---
4+
5+
chore(enhanced): update schema

packages/enhanced/src/schemas/container/ModuleFederationPlugin.json

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,11 @@
474474
}
475475
]
476476
},
477+
"shareStrategy": {
478+
"description": "[Deprecated]: load shared strategy(defaults to 'version-first').",
479+
"enum": ["version-first", "loaded-first"],
480+
"type": "string"
481+
},
477482
"singleton": {
478483
"description": "Allow only a single version of the shared module in share scope (disabled by default).",
479484
"type": "boolean"
@@ -573,8 +578,27 @@
573578
"additionalProperties": false,
574579
"properties": {
575580
"async": {
576-
"description": "Enable/disable asynchronous loading of runtime modules. When enabled, entry points will be wrapped in asynchronous chunks.",
577-
"type": "boolean"
581+
"description": "Enable/disable asynchronous loading of runtime modules or provide async boundary options.",
582+
"anyOf": [
583+
{ "type": "boolean" },
584+
{
585+
"type": "object",
586+
"properties": {
587+
"eager": {
588+
"description": "Eagerly load a module, matched via RegExp or predicate function",
589+
"anyOf": [
590+
{ "instanceof": "RegExp" },
591+
{ "instanceof": "Function" }
592+
]
593+
},
594+
"excludeChunk": {
595+
"description": "Predicate to exclude chunk from async boundary",
596+
"instanceof": "Function"
597+
}
598+
},
599+
"additionalProperties": false
600+
}
601+
]
578602
},
579603
"exposes": {
580604
"$ref": "#/definitions/Exposes"
@@ -676,7 +700,24 @@
676700
"type": "boolean"
677701
},
678702
"extractThirdParty": {
679-
"type": "boolean"
703+
"anyOf": [
704+
{ "type": "boolean" },
705+
{
706+
"type": "object",
707+
"properties": {
708+
"exclude": {
709+
"type": "array",
710+
"items": {
711+
"anyOf": [
712+
{ "type": "string" },
713+
{ "instanceof": "RegExp" }
714+
]
715+
}
716+
}
717+
},
718+
"additionalProperties": false
719+
}
720+
]
680721
},
681722
"extractRemoteTypes": {
682723
"type": "boolean"
@@ -719,7 +760,29 @@
719760
"items": {
720761
"type": "string"
721762
}
722-
}
763+
},
764+
"remoteTypeUrls": {
765+
"description": "Remote type URLs provider or map",
766+
"anyOf": [
767+
{ "instanceof": "Function" },
768+
{
769+
"type": "object",
770+
"additionalProperties": {
771+
"type": "object",
772+
"properties": {
773+
"alias": { "type": "string" },
774+
"api": { "type": "string" },
775+
"zip": { "type": "string" }
776+
},
777+
"required": ["api", "zip"],
778+
"additionalProperties": false
779+
}
780+
}
781+
]
782+
},
783+
"timeout": { "type": "number" },
784+
"family": { "enum": [4, 6] },
785+
"typesOnBuild": { "type": "boolean" }
723786
}
724787
}
725788
]
@@ -755,6 +818,21 @@
755818
},
756819
"provideExternalRuntime": {
757820
"type": "boolean"
821+
},
822+
"optimization": {
823+
"description": "Options related to build optimizations.",
824+
"type": "object",
825+
"properties": {
826+
"disableSnapshot": {
827+
"description": "Enable optimization to skip snapshot plugin",
828+
"type": "boolean"
829+
},
830+
"target": {
831+
"description": "Target environment for the build",
832+
"enum": ["web", "node"]
833+
}
834+
},
835+
"additionalProperties": false
758836
}
759837
}
760838
},

0 commit comments

Comments
 (0)