Skip to content

Commit 15871c7

Browse files
authored
fix(preload): add crossorigin attribute in CSS link tags (#17930)
1 parent 413c86a commit 15871c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/plugins/importAnalysisBuild.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ function preload(
125125
link.rel = isCss ? 'stylesheet' : scriptRel
126126
if (!isCss) {
127127
link.as = 'script'
128-
link.crossOrigin = ''
129128
}
129+
link.crossOrigin = ''
130130
link.href = dep
131131
if (cspNonce) {
132132
link.setAttribute('nonce', cspNonce)

0 commit comments

Comments
 (0)