Skip to content

Commit ed387e8

Browse files
committed
fix: font preload not being generated in rolldown-vite
1 parent cec0014 commit ed387e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/build/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ export async function build(
109109
clientResult.output.some(
110110
(chunk) =>
111111
chunk.type === 'chunk' &&
112-
chunk.name === 'theme' &&
112+
(vite.rolldownVersion || chunk.name === 'theme') && // FIXME: remove when rolldown-vite supports manualChunks
113113
chunk.moduleIds.some((id) => id.includes('client/theme-default'))
114114
)
115115

116116
const metadataScript = generateMetadataScript(pageToHashMap, siteConfig)
117117

118118
if (isDefaultTheme) {
119119
const fontURL = assets.find((file) =>
120-
/inter-roman-latin\.\w+\.woff2/.test(file)
120+
/inter-roman-latin\.[\w-]+\.woff2/.test(file)
121121
)
122122
if (fontURL) {
123123
additionalHeadTags.push([

0 commit comments

Comments
 (0)