diff options
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 |