Skip to content
Permalink
Browse files

fix(plugin-webpack): throw an error if webpack generates compilation …

…errors when packaging (#695)

ISSUES CLOSED: #579
  • Loading branch information
malept authored and MarshallOfSound committed Feb 26, 2019
1 parent 788412e commit 696b11d9b9bfe1781c2aa7547373889a5a53dda0
Showing with 8 additions and 0 deletions.
  1. +8 −0 packages/plugin/webpack/src/WebpackPlugin.ts
@@ -285,6 +285,10 @@ Your packaged app may be larger than expected if you dont ignore everything othe
}

if (err) return onceReject(err);
if (!watch && stats.hasErrors()) {
return onceReject(new Error(`Compilation errors in the main process: ${stats.toString()}`));
}

onceResolve();
};
if (watch) {
@@ -301,6 +305,10 @@ Your packaged app may be larger than expected if you dont ignore everything othe
await new Promise(async (resolve, reject) => {
webpack(await this.getRendererConfig(this.config.renderer.entryPoints)).run((err, stats) => {
if (err) return reject(err);
if (!watch && stats.hasErrors()) {
return reject(new Error(`Compilation errors in the renderer: ${stats.toString()}`));
}

resolve();
});
});

0 comments on commit 696b11d

Please sign in to comment.
You can’t perform that action at this time.