fix(ui): stub Node built-ins for fixture bundle
CI / check (push) Failing after 20s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped

Replace platform: 'node' (incompatible with iife browser bundle) with
explicit aliases for node:async_hooks, node:crypto, node:fs/promises,
node:path pointing at e2e/ui/node-stubs.mjs. Provides shape-compatible
exports so esbuild can bundle the UI fixture without failing on Node
built-ins. Increase webServer timeout to 120s for reliable startup.
This commit is contained in:
openhands committed 2026-10-17 16:11:52 +02:00
1 parent 728999b2de
commit e870beb71c
3 files changed
+45 -3

No files matched your search

+8 -2
View File
@@ -23,6 +23,7 @@ const actions = new Set([
"@/actions/article-recovery",
"@/actions/admin-media",
]);
const nodeStubs = path.join(root, "e2e/ui/node-stubs.mjs");
const bundle = await build({
entryPoints: [path.join(fixtures, "entry.tsx")],
bundle: true,
@@ -30,8 +31,13 @@ const bundle = await build({
outdir: path.join(root, "test-results/ui-fixture"),
format: "iife",
jsx: "automatic",
platform: "node",
alias: { "@": path.join(root, "src") },
alias: {
"@": path.join(root, "src"),
"node:async_hooks": nodeStubs,
"node:crypto": nodeStubs,
"node:fs/promises": nodeStubs,
"node:path": nodeStubs,
},
define: { "process.env.NODE_ENV": '"production"' },
plugins: [
{