Skip to content

Commit 32302af

Browse files
meteorlxyyyx990803
authored andcommitted
chore: show warnings in build debug mode (vuejs#285)
1 parent 53c8489 commit 32302af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/build.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
103103
reject(new Error(`Failed to compile with errors.`))
104104
return
105105
}
106+
if (cliOptions.debug && stats.hasWarnings()) {
107+
stats.toJson().warnings.forEach(warning => {
108+
console.warn(warning)
109+
})
110+
}
106111
resolve(stats.toJson({ modules: false }))
107112
})
108113
})

0 commit comments

Comments
 (0)