Skip to content

Commit 82f7a2d

Browse files
keidrunmontogeek
authored andcommitted
fix(contribute): Uncaught error in a compiler example. (#2965)
1 parent 5214229 commit 82f7a2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/content/contribute/writing-a-loader.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ export default (fixture, options = {}) => {
309309

310310
return new Promise((resolve, reject) => {
311311
compiler.run((err, stats) => {
312-
if (err || stats.hasErrors()) reject(err);
312+
if (err) reject(err);
313+
if (stats.hasErrors()) reject(new Error(stats.toJson().errors));
313314

314315
resolve(stats);
315316
});

0 commit comments

Comments
 (0)