SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
283 stars 130 forks source link

[SPIKE] Namespace /mobify #1795

Closed vcua-mobify closed 3 months ago

vcua-mobify commented 4 months ago

This is a POC of #1767

This PR shows how we can use the site alias defined in default.js as a namespace for the /mobify paths and for entries in local storage / cookie storage.

The document for this spike can be seen here: https://salesforce.quip.com/RaYKAunGpS3K

Testing this POC:

  1. Check out the code base
  2. Set an env variable called LOCAL_ENV_NAMESPACE to global
  3. Start the app. See that /mobify paths are namespaced. ie. /global/mobify/...
  4. Create a local.js config file and set the default site to RefArch
  5. Set LOCAL_ENV_NAMESPACE to us
  6. Restart the app. See that /mobify paths have a different namespace. ie. /us/mobify/...
vcua-mobify commented 3 months ago

1824, which sets the stage for adding a namespace has been merged in