You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now module federation just support consume url , and we can not get more info from url .
This prevents us from doing some performance optimization and function expansion, such as prefetch, type hints and so on .
If we can get more info like data assets, we can do more features .
Suggested solution
We can support consume manifest url . The manifest can recored data assets/version/type files . And we can load manifest to get these infos , and then do some features as we need .
Basic Usage
generate manifest
set options.manifest as true to enable generate manifest
Clear and concise description of the problem
Now module federation just support consume url , and we can not get more info from url .
This prevents us from doing some performance optimization and function expansion, such as prefetch, type hints and so on .
If we can get more info like data assets, we can do more features .
Suggested solution
We can support consume manifest url . The manifest can recored data assets/version/type files . And we can load manifest to get these infos , and then do some features as we need .
Basic Usage
set
options.manifest
astrue
to enable generate manifestset remote value url as manifest url :
Detail Design
The manifest has mainly four parts :
metaData
、remotes
、exposes
、shared
.metaData
: record provider self info likepublicPath
、remoteEntry
and so onexposes
: record expose fileasstes
、requires(shared)
and so onshared
: record sharedassets
、usedIn(exposes)
and so onremotes
: record remoteentry
、uesdIn
and so onWhat can we do with this data?
We can preload the remote assets though manifest.expose/shared.assets in these scens:
loadRemote
or justimport
remote , we can auto preload assets in runtime hookspreloadRemote
in idle time.Because manifest has
remotes
andexposes
fields , so we can easily know the relationship , and we can use it to draw a complete reference diagram.If users have PageServer , they can use manifest to deliver complete dependencies , and with this it can also make version/tag for MF modules.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: