docs: fix font preload example

pull/2104/head
Evan You 2 years ago
parent 0dc98ef2fb
commit 736f6c643f

@ -72,14 +72,16 @@ export default {
const myFontFile = assets.find(file => /font-name\.\w+\.woff2/) const myFontFile = assets.find(file => /font-name\.\w+\.woff2/)
if (myFontFile) { if (myFontFile) {
return [ return [
'link', [
{ 'link',
rel: 'preload', {
href: myFontFile, rel: 'preload',
as: 'font', href: myFontFile,
type: 'font/woff2', as: 'font',
crossorigin: '' type: 'font/woff2',
} crossorigin: ''
}
]
] ]
} }
} }

Loading…
Cancel
Save