@@ -5,7 +5,6 @@ import { createUnplugin } from 'unplugin'
55import { getHeadLinkTags } from './loaders'
66import { customVirtualModule } from './loaders/custom'
77import { fontsourceImports , fontsourceVirtualModule } from './loaders/fontsource'
8- import { HtmlTagDescriptor } from 'vite'
98
109const virtualStylesId = 'unfonts.css'
1110const resolvedVirtualStylesId = `\0${ virtualStylesId } `
@@ -91,10 +90,11 @@ export default createUnplugin<Options | undefined>((userOptions) => {
9190 const { prefetch : wantPrefetch , preload : wantPreload } = options ?. custom || { }
9291 for ( const file of files ) {
9392 if ( ! (
94- wantPrefetch === true || wantPreload === true ||
95- ( wantPrefetch === undefined && wantPreload === undefined )
96- ) )
93+ wantPrefetch === true || wantPreload === true
94+ || ( wantPrefetch === undefined && wantPreload === undefined )
95+ ) ) {
9796 continue
97+ }
9898 const ext = extname ( file )
9999 tags . push ( {
100100 tag : 'link' ,
@@ -113,7 +113,8 @@ export default createUnplugin<Options | undefined>((userOptions) => {
113113 const newTags = options ?. custom ?. linkFilter ( tags )
114114 if ( Array . isArray ( newTags ) ) {
115115 tagsReturned = newTags
116- } else {
116+ }
117+ else {
117118 tagsReturned = newTags ? tags : [ ]
118119 }
119120 }
@@ -140,10 +141,11 @@ function generateVitepressBundle(
140141 const { prefetch : wantPrefetch , preload : wantPreload } = options ?. custom || { }
141142 for ( const file of files ) {
142143 if ( ! (
143- wantPrefetch === true || wantPreload === true ||
144- ( wantPrefetch === undefined && wantPreload === undefined )
145- ) )
144+ wantPrefetch === true || wantPreload === true
145+ || ( wantPrefetch === undefined && wantPreload === undefined )
146+ ) ) {
146147 continue
148+ }
147149
148150 const ext = extname ( file )
149151 tags . push ( {
@@ -164,7 +166,8 @@ function generateVitepressBundle(
164166 const newTags = options ?. custom ?. linkFilter ( tags )
165167 if ( Array . isArray ( newTags ) ) {
166168 tagsReturned = newTags
167- } else {
169+ }
170+ else {
168171 tagsReturned = newTags ? tags : [ ]
169172 }
170173 }
0 commit comments