File tree Expand file tree Collapse file tree 2 files changed +59
-9
lines changed Expand file tree Collapse file tree 2 files changed +59
-9
lines changed Original file line number Diff line number Diff line change @@ -396,11 +396,36 @@ return () => ({
396396 ``` ts
397397 if (args .lifecycle === ' afterResolve' ) {
398398 // Use predefined backup manifest
399- const backupManifest = {
400- scope: ' remote1' ,
401- module: ' ./button' ,
402- url: ' /fallback/remote1-button.js'
403- };
399+ const backupManifest = const backupManifest = {
400+ id: ' fallback' ,
401+ name: ' fallback' ,
402+ metaData: {
403+ name: ' fallback' ,
404+ type: ' app' ,
405+ buildInfo: {
406+ buildVersion: ' local' ,
407+ buildName: ' fallback' ,
408+ },
409+ remoteEntry: {
410+ name: ' remoteEntry.js' ,
411+ path: ' ' ,
412+ type: ' global' ,
413+ },
414+ types: {
415+ path: ' ' ,
416+ name: ' ' ,
417+ zip: ' @mf-types.zip' ,
418+ api: ' @mf-types.d.ts' ,
419+ },
420+ globalName: ' fallback' ,
421+ pluginVersion: ' 1' ,
422+ prefetchInterface: false ,
423+ publicPath: ' https://example.com/' ,
424+ },
425+ shared: [],
426+ remotes: [],
427+ exposes: [],
428+ };
404429 return backupManifest ;
405430 }
406431 ```
Original file line number Diff line number Diff line change @@ -456,10 +456,35 @@ export default fallbackPlugin;
456456 if (args .lifecycle === ' afterResolve' ) {
457457 // 使用预定义的备用清单
458458 const backupManifest = {
459- scope: ' remote1' ,
460- module: ' ./button' ,
461- url: ' /fallback/remote1-button.js'
462- };
459+ id: ' fallback' ,
460+ name: ' fallback' ,
461+ metaData: {
462+ name: ' fallback' ,
463+ type: ' app' ,
464+ buildInfo: {
465+ buildVersion: ' local' ,
466+ buildName: ' fallback' ,
467+ },
468+ remoteEntry: {
469+ name: ' remoteEntry.js' ,
470+ path: ' ' ,
471+ type: ' global' ,
472+ },
473+ types: {
474+ path: ' ' ,
475+ name: ' ' ,
476+ zip: ' @mf-types.zip' ,
477+ api: ' @mf-types.d.ts' ,
478+ },
479+ globalName: ' fallback' ,
480+ pluginVersion: ' 1' ,
481+ prefetchInterface: false ,
482+ publicPath: ' https://example.com/' ,
483+ },
484+ shared: [],
485+ remotes: [],
486+ exposes: [],
487+ };
463488 return backupManifest ;
464489 }
465490 ```
You can’t perform that action at this time.
0 commit comments