File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import { kSassBundles } from "../../config/types.ts";
4141import { md5HashBytes } from "../../core/hash.ts" ;
4242import { InternalError } from "../../core/lib/error.ts" ;
4343import { writeTextFileSyncPreserveMode } from "../../core/write.ts" ;
44- import { getStack } from "../../core/deno/debug.ts" ;
4544import { assert } from "testing/asserts" ;
4645
4746// The output target for a sass bundle
@@ -163,6 +162,9 @@ export async function resolveSassBundles(
163162 // it can happen that processing generate an empty css file (e.g quarto-html deps with Quarto CSS variables)
164163 // in that case, no need to insert the cssPath in the dependency
165164 if ( ! cssPath ) continue ;
165+ if ( Deno . readTextFileSync ( cssPath ) . length === 0 ) {
166+ continue ;
167+ }
166168
167169 // Process attributes (forward on to the target)
168170 for ( const bundle of target . bundles ) {
Original file line number Diff line number Diff line change @@ -422,5 +422,5 @@ export function cleanSourceMappingUrl(cssPath: string): void {
422422 kSourceMappingRegexes [ 1 ] ,
423423 "" ,
424424 ) ;
425- writeTextFileSyncPreserveMode ( cssPath , cleaned ) ;
425+ writeTextFileSyncPreserveMode ( cssPath , cleaned . trim ( ) ) ;
426426}
You can’t perform that action at this time.
0 commit comments