diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-25 16:36:35 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-25 16:58:00 -0300 |
commit | 00fb648269c166c4995b38fe640748834fac7b18 (patch) | |
tree | c9a4b1582e8432566a42550cf4c37196dc61aa86 /packages | |
parent | 1243efb409e1157a23a1af4b01a7c8df2806ea9a (diff) |
esbuild wait fix, so compilation error also stop the script
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-webextension/build-fast-with-linaria.mjs | 72 | ||||
-rwxr-xr-x | packages/taler-wallet-webextension/esbuild.sh | 3 |
2 files changed, 42 insertions, 33 deletions
diff --git a/packages/taler-wallet-webextension/build-fast-with-linaria.mjs b/packages/taler-wallet-webextension/build-fast-with-linaria.mjs index 890217ae2..a34b4ff40 100644 --- a/packages/taler-wallet-webextension/build-fast-with-linaria.mjs +++ b/packages/taler-wallet-webextension/build-fast-with-linaria.mjs @@ -35,41 +35,49 @@ const preactCompatPlugin = { } 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 - .build({ - 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, - }), - ], - }) + .build(buildConfig) .catch((e) => { console.log(e) process.exit(1) diff --git a/packages/taler-wallet-webextension/esbuild.sh b/packages/taler-wallet-webextension/esbuild.sh index 202012e7a..2662f8b2d 100755 --- a/packages/taler-wallet-webextension/esbuild.sh +++ b/packages/taler-wallet-webextension/esbuild.sh @@ -7,7 +7,8 @@ set -e echo typecheck and bundle... node build-fast-with-linaria.mjs & pnpm tsc --noEmit & -wait +wait -n +wait -n echo testing... pnpm test -- -R dot |