@@ -62,9 +62,9 @@ export const links: LinksFunction = () => {
62
62
{ rel : 'preload' , href : fontStylestylesheetUrl , as : 'style' } ,
63
63
{ rel : 'preload' , href : tailwindStylesheetUrl , as : 'style' } ,
64
64
cssBundleHref ? { rel : 'preload' , href : cssBundleHref , as : 'style' } : null ,
65
- ... ( rdtStylesheetUrl && process . env . NODE_ENV === 'development'
66
- ? [ { rel : 'preload' , as : 'style' , href : rdtStylesheetUrl } ]
67
- : [ ] ) ,
65
+ rdtStylesheetUrl && process . env . NODE_ENV === 'development'
66
+ ? { rel : 'preload' , href : rdtStylesheetUrl , as : 'style' }
67
+ : null ,
68
68
{ rel : 'mask-icon' , href : '/favicons/mask-icon.svg' } ,
69
69
{
70
70
rel : 'alternate icon' ,
@@ -77,14 +77,14 @@ export const links: LinksFunction = () => {
77
77
href : '/site.webmanifest' ,
78
78
crossOrigin : 'use-credentials' ,
79
79
} as const , // necessary to make typescript happy
80
+ //These should match the css preloads above to avoid css as render blocking resource
80
81
{ rel : 'icon' , type : 'image/svg+xml' , href : '/favicons/favicon.svg' } ,
81
82
{ rel : 'stylesheet' , href : fontStylestylesheetUrl } ,
82
83
{ rel : 'stylesheet' , href : tailwindStylesheetUrl } ,
83
- { rel : 'stylesheet' , href : rdtStylesheetUrl } ,
84
- ...( rdtStylesheetUrl && process . env . NODE_ENV === 'development'
85
- ? [ { rel : 'stylesheet' , href : rdtStylesheetUrl } ]
86
- : [ ] ) ,
87
84
cssBundleHref ? { rel : 'stylesheet' , href : cssBundleHref } : null ,
85
+ rdtStylesheetUrl && process . env . NODE_ENV === 'development'
86
+ ? { rel : 'stylesheet' , href : rdtStylesheetUrl }
87
+ : null ,
88
88
] . filter ( Boolean )
89
89
}
90
90
0 commit comments