Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): checking for remote entry type when loading assets #2753

5 changes: 5 additions & 0 deletions .changeset/big-bulldogs-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/runtime': patch
---

checking for remote entry type when loading assets
1 change: 1 addition & 0 deletions packages/runtime/src/utils/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export function preloadAssets(
cb: () => {},
attrs: {
fetchpriority: 'high',
type: remoteInfo?.type === 'module' ? 'module' : 'text/javascript',
},
createScriptHook: (url: string) => {
const res = host.loaderHook.lifecycle.createScript.emit({
Expand Down
Loading