From 3e2d62cd1d01e63a734bce9ce14dec0dce0b3f59 Mon Sep 17 00:00:00 2001 From: Brian Love Date: Mon, 6 Apr 2026 16:45:19 -0700 Subject: [PATCH 1/2] fix(deploy): rewrite base href per example so assets resolve to correct subpath Production Angular examples at examples.stream-resource.dev returned 404 for main.js, styles.css, and chunks. Root cause: all index.html files had so asset URLs resolved to the domain root instead of /{product}/{topic}/. Fix: assemble script now rewrites base href to the correct subpath for each example. --- scripts/assemble-examples.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/assemble-examples.ts b/scripts/assemble-examples.ts index dbbd0014b..4144375df 100644 --- a/scripts/assemble-examples.ts +++ b/scripts/assemble-examples.ts @@ -9,7 +9,7 @@ * npx tsx scripts/assemble-examples.ts --skip-build */ import { execSync } from 'child_process'; -import { cpSync, mkdirSync, rmSync, existsSync, writeFileSync } from 'fs'; +import { cpSync, mkdirSync, rmSync, existsSync, writeFileSync, readFileSync } from 'fs'; import { resolve } from 'path'; const root = resolve(__dirname, '..'); @@ -54,6 +54,20 @@ for (const cap of capabilities) { mkdirSync(dest, { recursive: true }); cpSync(src, dest, { recursive: true }); + + // Fix to point to the correct subpath so assets resolve correctly. + // Without this, main.js/styles.css/chunks load from the root (/) instead of + // /{product}/{topic}/ and return 404 in production. + const indexPath = resolve(dest, 'index.html'); + if (existsSync(indexPath)) { + const html = readFileSync(indexPath, 'utf-8'); + const fixed = html.replace( + '', + ``, + ); + writeFileSync(indexPath, fixed); + } + console.log(`✅ ${cap.product}/${cap.topic}`); } From 16d12d27311815279c61a0069886c52eb7837141 Mon Sep 17 00:00:00 2001 From: Brian Love Date: Mon, 6 Apr 2026 17:03:59 -0700 Subject: [PATCH 2/2] fix(website): use .first() on form locator to handle multiple forms on pricing page --- apps/website/e2e/website.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website/e2e/website.spec.ts b/apps/website/e2e/website.spec.ts index 870ebec25..5638573b3 100644 --- a/apps/website/e2e/website.spec.ts +++ b/apps/website/e2e/website.spec.ts @@ -28,7 +28,7 @@ test('pricing page shows 4 plan cards', async ({ page }) => { test('pricing page lead form validates required fields', async ({ page }) => { await page.goto('/pricing'); await page.click('button[type="submit"]'); - await expect(page.locator('form')).toBeVisible(); + await expect(page.locator('form').first()).toBeVisible(); }); test('docs page renders sidebar and content', async ({ page }) => {