Skip to content

Commit f6a9866

Browse files
authored
fix(examples-chat): unblock canonical demo prod deploy — raise bundle budget + wire Maps key (#776)
The App-mode cockpit (@angular/google-maps + @angular/cdk + map/itinerary) pushed the production initial bundle ~80kB over the 1.5MB budget; only the production config enforces budgets, so dev/e2e passed while the 'Canonical demo → Vercel' job failed at build (frontend never deployed). Raise the initial budget to 1.75MB (warn 1.6MB), matching the feature's weight. Also pass GOOGLE_MAPS_API_KEY + GOOGLE_MAPS_MAP_ID to the canonical demo assemble step (mirroring the ag-ui deploy) so inject-env bakes a keyed bundle and the App-mode toggle is enabled in prod.
1 parent e27b86a commit f6a9866

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,14 @@ jobs:
809809
cache: npm
810810
- run: npm ci
811811
- name: Build and assemble canonical demo
812+
env:
813+
# Baked into the SPA bundle by inject-env at build time (assemble-demo.ts
814+
# runs `nx build examples-chat-angular`, whose build target dependsOn
815+
# inject-env). Without the key the App-mode map toggle is disabled in
816+
# prod. The key ships in the public bundle (normal for Maps JS) — restrict
817+
# it by HTTP referrer in the Google Cloud console. The Map ID is not a secret.
818+
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
819+
GOOGLE_MAPS_MAP_ID: 86d464ea7d5306034fe2a254
812820
run: npx tsx scripts/assemble-demo.ts
813821
- name: Deploy canonical demo to Vercel (production)
814822
working-directory: deploy/demo

examples/chat/angular/project.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"budgets": [
5151
{
5252
"type": "initial",
53-
"maximumWarning": "500kb",
54-
"maximumError": "1.5mb"
53+
"maximumWarning": "1.6mb",
54+
"maximumError": "1.75mb"
5555
},
5656
{
5757
"type": "anyComponentStyle",
@@ -74,8 +74,8 @@
7474
"budgets": [
7575
{
7676
"type": "initial",
77-
"maximumWarning": "500kb",
78-
"maximumError": "1.5mb"
77+
"maximumWarning": "1.6mb",
78+
"maximumError": "1.75mb"
7979
},
8080
{
8181
"type": "anyComponentStyle",

0 commit comments

Comments
 (0)