File tree 1 file changed +6
-6
lines changed
packages/gatsby/src/commands
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change
1
+ import { Span } from "opentracing"
1
2
import webpack from "webpack"
3
+
2
4
import webpackConfig from "../utils/webpack.config"
5
+
3
6
import { IProgram } from "./types"
4
- import { Span } from "opentracing"
5
7
6
8
import { reportWebpackWarnings } from "../utils/webpack-error-utils"
7
9
@@ -22,18 +24,16 @@ export const buildProductionBundle = async (
22
24
return new Promise ( ( resolve , reject ) => {
23
25
webpack ( compilerConfig ) . run ( ( err , stats ) => {
24
26
if ( err ) {
25
- reject ( err )
26
- return
27
+ return reject ( err )
27
28
}
28
29
29
30
reportWebpackWarnings ( stats )
30
31
31
32
if ( stats . hasErrors ( ) ) {
32
- reject ( stats . compilation . errors )
33
- return
33
+ return reject ( stats . compilation . errors )
34
34
}
35
35
36
- resolve ( stats )
36
+ return resolve ( stats )
37
37
} )
38
38
} )
39
39
}
You can’t perform that action at this time.
0 commit comments