From 36089b45c8c187c373a39f5c7b729b774d3567d7 Mon Sep 17 00:00:00 2001 From: matenagy Date: Thu, 5 Dec 2024 14:46:49 +0100 Subject: [PATCH] fix: vite v6 css filename hash --- src/webfont-download.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/webfont-download.ts b/src/webfont-download.ts index a48ebc5..83b4bf9 100644 --- a/src/webfont-download.ts +++ b/src/webfont-download.ts @@ -208,7 +208,7 @@ export class WebfontDownload { `cache hit: ${colors.bold(this.toPercent(this.fileCache.hits.css, allWebfontUrls.size))}` : 'cache disabled' ) + - ')'), + ')'), false ); } @@ -254,7 +254,7 @@ export class WebfontDownload { `cache hit: ${colors.bold(this.toPercent(this.fileCache.hits.font, this.fonts.size))}` : 'cache disabled' ) + - ')'), + ')'), false ); } @@ -293,6 +293,7 @@ export class WebfontDownload { saveFile(fileName: string, source: string | Buffer): string { const ref = this.emitFile({ name: fileName, + ...fileName.includes('.css') && { fileName: `${this.assetsDir}/${fileName}` }, type: 'asset', source: source, });