We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eacf1b7 commit 9b0bb9bCopy full SHA for 9b0bb9b
src/resource_loader.ts
@@ -99,6 +99,12 @@ export class WebpackResourceLoader {
99
// Compile and return a promise
100
return new Promise((resolve, reject) => {
101
childCompiler.compile((err: Error, childCompilation: any) => {
102
+ if (err) {
103
+ reject(err);
104
+
105
+ return;
106
+ }
107
108
// Resolve / reject the promise
109
const { warnings, errors } = childCompilation;
110
@@ -114,8 +120,6 @@ export class WebpackResourceLoader {
114
120
.join('\n');
115
121
116
122
reject(new Error('Child compilation failed:\n' + errorDetails));
117
- } else if (err) {
118
- reject(err);
119
123
} else {
124
Object.keys(childCompilation.assets).forEach(assetName => {
125
// Add all new assets to the parent compilation, with the exception of
0 commit comments