Makeswift

Beta

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.

pnpm catalyst channels update --channel-id <CHANNEL_ID> --hostname <DEPLOYMENT_HOSTNAME>

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.

  1. Copy the API key from your production site in the Makeswift dashboard under Settings > Host.

  2. 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.

    pnpm catalyst env add MAKESWIFT_SITE_API_KEY=<YOUR_PRODUCTION_MAKESWIFT_SITE_API_KEY>

    To override it for a single deploy without storing it, pass --secret MAKESWIFT_SITE_API_KEY=<YOUR_PRODUCTION_MAKESWIFT_SITE_API_KEY> to catalyst deploy instead.

  3. 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-path replaces .env.local for the build, so it must also contain your BIGCOMMERCE_* variables.

    pnpm catalyst deploy --env-path .env.production
  4. 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