File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
packages/runtime/src/utils Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @module-federation/runtime ' : patch
3+ ---
4+
5+ Ensured createScript runtime hook always receives ` attrs `
Original file line number Diff line number Diff line change @@ -82,9 +82,10 @@ export function preloadAssets(
8282 getRemoteEntry ( {
8383 remoteInfo : moduleInfo ,
8484 remoteEntryExports : module . remoteEntryExports ,
85- createScriptHook : ( url : string ) => {
85+ createScriptHook : ( url : string , attrs : any ) => {
8686 const res = host . loaderHook . lifecycle . createScript . emit ( {
8787 url,
88+ attrs,
8889 } ) ;
8990 if ( ! res ) return ;
9091
@@ -108,9 +109,10 @@ export function preloadAssets(
108109 getRemoteEntry ( {
109110 remoteInfo : moduleInfo ,
110111 remoteEntryExports : undefined ,
111- createScriptHook : ( url : string ) => {
112+ createScriptHook : ( url : string , attrs : any ) => {
112113 const res = host . loaderHook . lifecycle . createScript . emit ( {
113114 url,
115+ attrs,
114116 } ) ;
115117 if ( ! res ) return ;
116118
@@ -212,9 +214,10 @@ export function preloadAssets(
212214 fetchpriority : 'high' ,
213215 type : remoteInfo ?. type === 'module' ? 'module' : 'text/javascript' ,
214216 } ,
215- createScriptHook : ( url : string ) => {
217+ createScriptHook : ( url : string , attrs : any ) => {
216218 const res = host . loaderHook . lifecycle . createScript . emit ( {
217219 url,
220+ attrs,
218221 } ) ;
219222 if ( res instanceof HTMLScriptElement ) {
220223 return res ;
You can’t perform that action at this time.
0 commit comments