mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-22 08:48:06 -06:00
fix(build): fail on warnings emitted during the generate phase
failOnWarningsPlugin checked the warning count in buildEnd, which runs before chunk-generation warnings (e.g. INEFFECTIVE_DYNAMIC_IMPORT) are emitted, so those never failed the build. Move the check to closeBundle, the last hook. Assisted-by: Claude:Opus-4.8
This commit is contained in:
@@ -45,7 +45,7 @@ function failOnWarningsPlugin(): Rolldown.Plugin {
|
||||
onLog(level) {
|
||||
if (level === 'warn') warningCount++;
|
||||
},
|
||||
buildEnd() {
|
||||
closeBundle() {
|
||||
if (!warningCount) return;
|
||||
throw new Error(`${warningCount} warnings present`);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user