fix: fix preload
This commit is contained in:
parent
8f4702782b
commit
b9e9e2d691
6 changed files with 32 additions and 29 deletions
|
@ -1,4 +1,5 @@
|
|||
export default defineNuxtConfig({
|
||||
ssr: true,
|
||||
nitro: {
|
||||
prerender: {
|
||||
routes: [
|
||||
|
@ -7,6 +8,9 @@ export default defineNuxtConfig({
|
|||
]
|
||||
}
|
||||
},
|
||||
css: [
|
||||
'~/assets/css/fonts.css'
|
||||
],
|
||||
routeRules: {
|
||||
'/': { prerender: true },
|
||||
'/imp': { prerender: true },
|
||||
|
@ -17,10 +21,10 @@ export default defineNuxtConfig({
|
|||
link: [
|
||||
{ rel: 'preload', as: 'image', href: '/img/profile_big.webp', type: 'image/webp' },
|
||||
{ rel: 'preload', as: 'image', href: '/img/profile_small.webp', type: 'image/webp' },
|
||||
{ rel: 'preload', as: 'font', href: '/opensans.woff2', type: 'font/woff2' },
|
||||
{ rel: 'preload', as: 'font', href: '/roboto_con_bold.woff2', type: 'font/woff2' },
|
||||
{ rel: 'preload', as: 'font', href: '/roboto_con_reg.woff2', type: 'font/woff2' },
|
||||
]
|
||||
{ rel: 'preload', crossorigin: 'anonymous', as: 'font', href: '/fonts/opensans.woff2', type: 'font/woff2' },
|
||||
{ rel: 'preload', crossorigin: 'anonymous', as: 'font', href: '/fonts/roboto_con_bold.woff2', type: 'font/woff2' },
|
||||
{ rel: 'preload', crossorigin: 'anonymous', as: 'font', href: '/fonts/roboto_con_reg.woff2', type: 'font/woff2' },
|
||||
],
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue