Skip to content

Commit 67ea678

Browse files
fix(runtime): checking for remote entry type when loading assets (#2753)
Co-authored-by: Zack Jackson <[email protected]>
1 parent 9d6172e commit 67ea678

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/big-bulldogs-matter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/runtime': patch
3+
---
4+
5+
checking for remote entry type when loading assets

packages/runtime/src/utils/preload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export function preloadAssets(
210210
cb: () => {},
211211
attrs: {
212212
fetchpriority: 'high',
213+
type: remoteInfo?.type === 'module' ? 'module' : 'text/javascript',
213214
},
214215
createScriptHook: (url: string) => {
215216
const res = host.loaderHook.lifecycle.createScript.emit({

0 commit comments

Comments
 (0)