From e0e2b38c2e369edca31e027f586edcced25a9fed Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 22 Jun 2026 23:53:37 +0200 Subject: [PATCH] =?UTF-8?q?CSS=20extracted=20from=20a=20JS=20chunk=20has?= =?UTF-8?q?=20no=20top-level=20manifest=20entry=20=E2=80=94=20emit=20a=20d?= =?UTF-8?q?irect=20link=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/Vite.cfc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/models/Vite.cfc b/models/Vite.cfc index 29868d1..c985804 100644 --- a/models/Vite.cfc +++ b/models/Vite.cfc @@ -71,6 +71,10 @@ component singleton accessors="true" { var partialManifest = manifest.filter( ( key, value ) => value.file == css ); if ( partialManifest.isEmpty() ) { + // CSS extracted from a JS chunk has no top-level manifest entry — emit a direct link tag + var cssPath = generateAssetPath( css ); + preloads.append( { "src": css, "path": cssPath, "chunk": {}, "manifest": manifest } ); + tags.append( generateStylesheetTagWithAttributes( cssPath ) ); continue; } @@ -106,6 +110,10 @@ component singleton accessors="true" { var partialManifest = manifest.filter( ( key, value ) => value.file == css ); if ( partialManifest.isEmpty() ) { + // CSS extracted from a JS chunk has no top-level manifest entry — emit a direct link tag + var cssPath = generateAssetPath( css ); + preloads.append( { "src": css, "path": cssPath, "chunk": {}, "manifest": manifest } ); + tags.append( generateStylesheetTagWithAttributes( cssPath ) ); continue; }