Skip to content

Commit

Permalink
chore(app): stop compile when has errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Nov 4, 2022
1 parent 2646584 commit fc4114b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class WebpackAppPlusPlugin {
callback()
})

compiler.hooks.done.tapPromise('WebpackAppPlusPlugin', compilation => {
compiler.hooks.done.tapPromise('WebpackAppPlusPlugin', stats => {
return new Promise((resolve, reject) => {
isAppNVue && (nvueCompiled = true)
isAppService && (serviceCompiled = true)
Expand All @@ -82,7 +82,9 @@ class WebpackAppPlusPlugin {
done('Build complete. FILES:' + JSON.stringify(changedFiles))
}
} else {
!process.env.UNI_AUTOMATOR_WS_ENDPOINT && done('Build complete. Watching for changes...')
if (!stats.hasErrors()) {
!process.env.UNI_AUTOMATOR_WS_ENDPOINT && done('Build complete. Watching for changes...')
};
}
isFirst = false
} else {
Expand All @@ -97,7 +99,7 @@ class WebpackAppPlusPlugin {
})
})
} else {
compiler.hooks.done.tapPromise('WebpackAppPlusPlugin', compilation => {
compiler.hooks.done.tapPromise('WebpackAppPlusPlugin', stats => {
return new Promise((resolve, reject) => {
if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
return resolve()
Expand Down Expand Up @@ -135,4 +137,4 @@ class WebpackAppPlusPlugin {
}
}

module.exports = WebpackAppPlusPlugin
module.exports = WebpackAppPlusPlugin

0 comments on commit fc4114b

Please sign in to comment.