File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,18 @@ module.exports = (api, projectOptions) => {
88 const serveFn = serve . fn ;
99 const webpackConfig = projectOptions . pluginOptions && projectOptions . pluginOptions . netlify && projectOptions . pluginOptions . netlify . webpackConfig ;
1010
11- build . fn = ( ...args ) => {
12- return buildFn ( ...args ) . then ( ( res ) => {
13- return lambdaBuild
14- . run ( "src/lambda" , webpackConfig )
15- . then ( function ( stats ) {
16- console . log ( stats . toString ( { color : true } ) )
17- return res
18- } )
19- . catch ( function ( err ) {
20- console . error ( err )
21- process . exit ( 1 )
22- } )
23- } )
11+ build . fn = async ( ...args ) => {
12+ try {
13+ const [ res , stats ] = await Promise . all ( [
14+ buildFn ( ...args ) ,
15+ lambdaBuild . run ( 'src/lambda' , webpackConfig ) ,
16+ ] ) ;
17+ console . log ( stats . toString ( { color : true } ) ) ;
18+ return res ;
19+ } catch ( err ) {
20+ console . error ( err ) ;
21+ process . exit ( 1 ) ;
22+ }
2423 }
2524
2625 serve . fn = ( ...args ) => {
You can’t perform that action at this time.
0 commit comments