Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-webpack): check that stats is not empty before sending to multi-logger #1018

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/plugin/webpack/src/WebpackPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Your packaged app may be larger than expected if you dont ignore everything othe
const compiler = webpack(await this.getMainConfig());
const [onceResolve, onceReject] = once(resolve, reject);
const cb: webpack.ICompiler.Handler = (err, stats) => {
if (tab) {
if (tab && stats) {
tab.log(stats.toString({
colors: true,
}));
Expand Down Expand Up @@ -443,9 +443,11 @@ Your packaged app may be larger than expected if you dont ignore everything othe
const tab = logger.createTab(`${entryPoint.name} - Preload`);
const [onceResolve, onceReject] = once(resolve, reject);
const cb: webpack.ICompiler.Handler = (err, stats) => {
tab.log(stats.toString({
colors: true,
}));
if (stats) {
tab.log(stats.toString({
colors: true,
}));
}

if (err) return onceReject(err);
return onceResolve();
Expand Down