Skip to content

Commit

Permalink
fix(playground/ssr-vue): remove crossorigin from image preloads (#4268)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjk committed Jul 16, 2021
1 parent 09e2a63 commit 5935055
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/playground/ssr-vue/src/App.vue
Expand Up @@ -16,7 +16,7 @@
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('./assets/fonts/Inter-Italic.woff2?#iefix') format('woff2'),
src: url('./assets/fonts/Inter-Italic.woff2#iefix') format('woff2'),
url('./assets/fonts/Inter-Italic.woff') format('woff');
}
.inter {
Expand Down
10 changes: 4 additions & 6 deletions packages/playground/ssr-vue/src/entry-server.js
Expand Up @@ -49,13 +49,11 @@ function renderPreloadLink(file) {
} else if (file.endsWith('.woff2')) {
return ` <link rel="preload" href="${file}" as="font" type="font/woff2" crossorigin>`
} else if (file.endsWith('.gif')) {
return ` <link rel="preload" href="${file}" as="image" type="image/gif" crossorigin>`
} else if (file.endsWith('.jpg')) {
return ` <link rel="preload" href="${file}" as="image" type="image/jpeg" crossorigin>`
} else if (file.endsWith('.jpeg')) {
return ` <link rel="preload" href="${file}" as="image" type="image/jpeg" crossorigin>`
return ` <link rel="preload" href="${file}" as="image" type="image/gif">`
} else if (file.endsWith('.jpg') || file.endsWith('.jpeg')) {
return ` <link rel="preload" href="${file}" as="image" type="image/jpeg">`
} else if (file.endsWith('.png')) {
return ` <link rel="preload" href="${file}" as="image" type="image/png" crossorigin>`
return ` <link rel="preload" href="${file}" as="image" type="image/png">`
} else {
// TODO
return ''
Expand Down

0 comments on commit 5935055

Please sign in to comment.