Unverified Commit 48e2c19d authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Serialize JSON Warnings Before Event (#11976)

parent 511cf748
......@@ -336,13 +336,15 @@ export function watchCompilers(
stats.compilation.errors.push(...(filteredErrors || []))
stats.compilation.warnings.push(...(filteredWarnings || []))
const {
errors: newErrors,
warnings: newWarnings,
} = formatWebpackMessages(
stats.toJson({ all: false, warnings: true, errors: true })
)
onTypeChecked({
errors: stats.compilation.errors.length
? stats.compilation.errors
: null,
warnings: stats.compilation.warnings.length
? stats.compilation.warnings
: null,
errors: newErrors?.length ? newErrors : null,
warnings: newWarnings?.length ? newWarnings : null,
})
onEvent({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment