diff options
Diffstat (limited to 'packages/demobank-ui/dev.mjs')
-rwxr-xr-x | packages/demobank-ui/dev.mjs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/demobank-ui/dev.mjs b/packages/demobank-ui/dev.mjs index 35a9fa16c..74df51195 100755 --- a/packages/demobank-ui/dev.mjs +++ b/packages/demobank-ui/dev.mjs @@ -16,15 +16,20 @@ */ import { serve } from "@gnu-taler/web-util/lib/index.node"; -import esbuild from "esbuild"; -import { buildConfig } from "./build.mjs"; +import { initializeDev, getFilesInSource } from "@gnu-taler/web-util/lib/index.build" -buildConfig.inject = ['./node_modules/@gnu-taler/web-util/lib/live-reload.mjs'] +const allTestFiles = getFilesInSource(/.test.tsx?$/); +const devEntryPoints = ["src/stories.tsx", "src/index.tsx", ...allTestFiles]; + +const buildDev = initializeDev(devEntryPoints) + +await buildDev(); serve({ - folder: './dist', + folder: './dist/dev', port: 8080, source: './src', + insecure: true, development: true, - onUpdate: async () => esbuild.build(buildConfig) + onUpdate: buildDev }) |