Makeswift
A Makeswift-enabled Catalyst storefront depends on two Makeswift settings: the site’s base URL, which tells the Makeswift editor where your storefront runs, and MAKESWIFT_SITE_API_KEY, which tells your storefront which Makeswift site to load content from. When you deploy to Native Hosting, the first one updates automatically and the second one doesn’t.
The Catalyst CLI is generally available, but Native Hosting is currently in closed beta. There may be breaking changes to the Native Hosting APIs as we finalize them. To express interest in gaining access, fill out the Native Hosting Closed Beta Interest Form.
The Makeswift site URL follows the channel
When you point a channel at your deployment with channels update, BigCommerce also sets the base URL of the Makeswift site connected to that channel to the same hostname. You don’t need to change it in the Makeswift dashboard.
The same applies when catalyst deploy --update-site-url updates the channel for you. To confirm the change, open the site in the Makeswift dashboard and check Settings > Host.
Set the production API key yourself
The CLI never changes MAKESWIFT_SITE_API_KEY. Your deployment uses whatever key is in .env.local when you build, which is usually the key for your development Makeswift site. To serve content from your production Makeswift site, set its key yourself.
-
Copy the API key from your production site in the Makeswift dashboard under Settings > Host.
-
Store the key on your project so every deploy sends it to the deployed storefront, where it takes precedence over the value built from
.env.local.To override it for a single deploy without storing it, pass
--secret MAKESWIFT_SITE_API_KEY=<YOUR_PRODUCTION_MAKESWIFT_SITE_API_KEY>tocatalyst deployinstead. -
Make the build use the same key. The build reads
.env.local, so a development key there still reaches the build. Set the production key in your shell, or deploy with a separate env file. A file passed with--env-pathreplaces.env.localfor the build, so it must also contain yourBIGCOMMERCE_*variables. -
Confirm the deployed storefront shows content from your production Makeswift site.
Keep the development key in .env.local for local work with pnpm dev. For how the CLI loads env files and stored variables, see Storefront build variables. For the variable itself, see MAKESWIFT_SITE_API_KEY.
Next steps
- Point a channel at your deployment so the channel and its Makeswift site use your deployment’s hostname.
- Edit and sync content in your production Makeswift site.