Skip to content

Commit 364f2bc

Browse files
authored
fix(runtime): resolve the problem that static resource preload is not reused (#2531)
1 parent ea34795 commit 364f2bc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/sdk': patch
3+
---
4+
5+
fix: Resolve the problem that static resource preload is not reused

packages/sdk/src/dom.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export function createLink(
140140
if (!link) {
141141
link = document.createElement('link');
142142
link.setAttribute('href', url);
143+
link.setAttribute('crossorigin', 'anonymous');
143144

144145
if (createLinkHook) {
145146
const createLinkRes = createLinkHook(url);

0 commit comments

Comments
 (0)