Skip to content

Conversation

@bc-victor
Copy link
Contributor

What/Why?

  • Add BUYER_PORTAL_ENVIRONMENT to select the Buyer Portal CDN: production (default), staging, or integration.
  • In ScriptProduction resolve CDN via a simple env→URL map
  • Update loader.ts to pass the optional BUYER_PORTAL_ENVIRONMENT (defaults to production).

Testing

  • With LOCAL_BUYER_PORTAL_HOST set, dev mode should still load the local app (no changes needed).
  • With LOCAL_BUYER_PORTAL_HOST unset:
    • BUYER_PORTAL_ENVIRONMENT=productionhttps://microapps.bigcommerce.com/b2b-buyer-portal/headless.js
    • BUYER_PORTAL_ENVIRONMENT=staginghttps://microapps.staging.zone/b2b-buyer-portal/headless.js
    • BUYER_PORTAL_ENVIRONMENT=integrationhttps://microapps.integration.zone/b2b-buyer-portal/headless.js
  • Verify in the Network tab and ensure the script tag includes data-environment with the expected value.
  • Sign in and confirm the Buyer Portal loads and session behaviors (cart sync, events) are unchanged.
Screen.Recording.2025-10-22.at.2.53.24.p.m.mov

Migration

  • Optional: replace previous staging/custom origin envs with the new single BUYER_PORTAL_ENVIRONMENT.
    • Remove any use of STAGING_B2B_CDN_ORIGIN if present.
    • Add BUYER_PORTAL_ENVIRONMENT=staging|integration as needed; omit for production (default).
  • No code changes required for consumers; B2BLoader now passes environment to ScriptProduction.

@bc-victor bc-victor requested a review from a team as a code owner October 22, 2025 21:57
@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2025

⚠️ No Changeset found

Latest commit: 69e0b4a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
catalyst-b2b Ready Ready Preview Comment Oct 23, 2025 5:33pm
catalyst-canary Ready Ready Preview Comment Oct 23, 2025 5:33pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
catalyst Ignored Ignored Oct 23, 2025 5:33pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants