esbuild wait fix, so compilation error also stop the script

This commit is contained in:
Sebastian 2022-03-25 16:36:35 -03:00
parent 1243efb409
commit 00fb648269
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
2 changed files with 42 additions and 33 deletions

View File

@ -35,11 +35,16 @@ const preactCompatPlugin = {
} }
const entryPoints = [ const entryPoints = [
'src/popupEntryPoint.tsx', 'src/walletEntryPoint.tsx', 'src/background.ts', 'src/browserWorkerEntry.ts' 'src/popupEntryPoint.tsx',
'src/popupEntryPoint.dev.tsx',
'src/walletEntryPoint.tsx',
'src/walletEntryPoint.dev.tsx',
'src/background.ts',
'src/background.dev.ts',
'src/browserWorkerEntry.ts'
] ]
await esbuild export const buildConfig = {
.build({
entryPoints: [...entryPoints, ...allTestFiles], entryPoints: [...entryPoints, ...allTestFiles],
bundle: true, bundle: true,
outdir: 'dist', outdir: 'dist',
@ -69,7 +74,10 @@ await esbuild
sourceMap: true, sourceMap: true,
}), }),
], ],
}) }
await esbuild
.build(buildConfig)
.catch((e) => { .catch((e) => {
console.log(e) console.log(e)
process.exit(1) process.exit(1)

View File

@ -7,7 +7,8 @@ set -e
echo typecheck and bundle... echo typecheck and bundle...
node build-fast-with-linaria.mjs & node build-fast-with-linaria.mjs &
pnpm tsc --noEmit & pnpm tsc --noEmit &
wait wait -n
wait -n
echo testing... echo testing...
pnpm test -- -R dot pnpm test -- -R dot