Skip to content

Commit

Permalink
fix(build): add crossorigin attribute to link[rel="stylesheet"] (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
Priestch authored Oct 18, 2023
1 parent 279da84 commit 6e7b25c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/plugins/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin {
tag: 'link',
attrs: {
rel: 'stylesheet',
crossorigin: true,
href: toOutputPath(file),
},
})
Expand Down Expand Up @@ -794,6 +795,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin {
tag: 'link',
attrs: {
rel: 'stylesheet',
crossorigin: true,
href: toOutputAssetFilePath(cssChunk.fileName),
},
},
Expand Down

0 comments on commit 6e7b25c

Please sign in to comment.