declare global { var __webpack_init_sharing__ ; var __webpack_share_scopes__ ; } interface ModuleFederationSharedScope { default : Record < string , any > ; [ index ] : Record < string , any > ; } export interface ModuleFederationContainer { init ( scope ) : Promise < void > ; get < T = unknown > ( name ) : Promise < T > ; } export const initModuleFederation = async ( container ? , scope = 'default' ) => { if ( container ) { await container . init ( __webpack_share_scopes__ [ scope ] ) ; return ; } await __webpack_init_sharing__ ( 'default' ) ; const shareScope = __webpack_share_scopes__ [ scope ] ; if ( ! shareScope . react ) { shareScope . react = { '*' : { get : ( ) => ( ) => require ( 'react' ) , from : 'tramvai-mf-fix' , eager : true , loaded : true , } , } ; } if ( ! shareScope [ 'react-dom' ] ) { shareScope [ 'react-dom' ] = { '*' : { get : ( ) => ( ) => require ( 'react-dom' ) , from : 'tramvai-mf-fix' , eager : true , loaded : true , } , } ; } } ; export const getModuleFederation = async ( container , name = 'entry' ) => { return container . get ( name ) ; } ;