esbuild wait fix, so compilation error also stop the script
This commit is contained in:
parent
1243efb409
commit
00fb648269
@ -35,41 +35,49 @@ 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'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const buildConfig = {
|
||||||
|
entryPoints: [...entryPoints, ...allTestFiles],
|
||||||
|
bundle: true,
|
||||||
|
outdir: 'dist',
|
||||||
|
minify: false,
|
||||||
|
loader: {
|
||||||
|
'.svg': 'text',
|
||||||
|
'.png': 'file',
|
||||||
|
},
|
||||||
|
target: [
|
||||||
|
'es6'
|
||||||
|
],
|
||||||
|
format: 'iife',
|
||||||
|
platform: 'browser',
|
||||||
|
sourcemap: 'external',
|
||||||
|
jsxFactory: 'h',
|
||||||
|
jsxFragment: 'Fragment',
|
||||||
|
// define: {
|
||||||
|
// 'process.env.NODE_ENV': '"development"',
|
||||||
|
// },
|
||||||
|
plugins: [
|
||||||
|
preactCompatPlugin,
|
||||||
|
linaria.default({
|
||||||
|
babelOptions: {
|
||||||
|
babelrc: false,
|
||||||
|
configFile: './babel.config-linaria.json',
|
||||||
|
},
|
||||||
|
sourceMap: true,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
await esbuild
|
await esbuild
|
||||||
.build({
|
.build(buildConfig)
|
||||||
entryPoints: [...entryPoints, ...allTestFiles],
|
|
||||||
bundle: true,
|
|
||||||
outdir: 'dist',
|
|
||||||
minify: false,
|
|
||||||
loader: {
|
|
||||||
'.svg': 'text',
|
|
||||||
'.png': 'file',
|
|
||||||
},
|
|
||||||
target: [
|
|
||||||
'es6'
|
|
||||||
],
|
|
||||||
format: 'iife',
|
|
||||||
platform: 'browser',
|
|
||||||
sourcemap: 'external',
|
|
||||||
jsxFactory: 'h',
|
|
||||||
jsxFragment: 'Fragment',
|
|
||||||
// define: {
|
|
||||||
// 'process.env.NODE_ENV': '"development"',
|
|
||||||
// },
|
|
||||||
plugins: [
|
|
||||||
preactCompatPlugin,
|
|
||||||
linaria.default({
|
|
||||||
babelOptions: {
|
|
||||||
babelrc: false,
|
|
||||||
configFile: './babel.config-linaria.json',
|
|
||||||
},
|
|
||||||
sourceMap: true,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user