Skip to content

Commit 4e0e3a7

Browse files
Log skipped CSS placeholder in development
When a CSS artifact is missing in dev, log a clear message before returning so it’s easier to diagnose during local builds.
1 parent c1c0880 commit 4e0e3a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@ async function copyFiles(entryPoints, targetDir) {
418418
// Skip missing CSS in development (placeholders will be created later)
419419
const isCss = String(entryPoint.dst).endsWith('.css')
420420
if (!isProduction || isCss) {
421-
if (!isProduction && isCss) return
421+
if (!isProduction && isCss) {
422+
console.log(
423+
`[build] Skipping missing CSS file: ${entryPoint.src} -> ${entryPoint.dst} (placeholder will be created)`,
424+
)
425+
return
426+
}
422427
}
423428
throw new Error(`Missing build artifact: ${entryPoint.src}`)
424429
}

0 commit comments

Comments
 (0)