Skip to content

Commit ec6b6ab

Browse files
committed
refactor: use Promise.all
1 parent 8f19c08 commit ec6b6ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import esbuild from 'esbuild'
22
import copyPluginPkg from '@sprout2000/esbuild-copy-plugin'
33
import { lessLoader } from 'esbuild-plugin-less'
44
import * as process from 'node:process'
5+
import * as console from 'node:console'
56

67
const { copyPlugin } = copyPluginPkg
78
const isProduction = !process.argv.includes('--development')
@@ -79,4 +80,9 @@ async function buildUI(...apps) {
7980
}
8081
}
8182

82-
await Promise.allSettled([buildExtension(), buildUI('ing', 'post-cfg')])
83+
try {
84+
await Promise.all([buildExtension(), buildUI('ing', 'post-cfg')])
85+
} catch (ex) {
86+
console.error(ex)
87+
process.exit(1)
88+
}

0 commit comments

Comments
 (0)