Skip to main content

Build Pipeline

This page explains what happens when Shoppex builds and deploys a theme.

High-Level Steps

Simplified:
1

Create workspace

Shoppex creates a temporary build folder.
2

Download source

Theme source is copied from Shoppex-managed storage.
3

Install + build

bun install then bun run build (must produce dist/).
4

Inject initial data (optional)

If <!--initial-data--> exists in dist/index.html, Shoppex injects window.__SHOPPEX_INITIAL__.
5

Publish output

The dist/ folder is published as static files for customers.
6

Refresh caches

Shoppex refreshes caches so customers see the update quickly.

Source vs Live Output (Important)

Conceptually there are two things:
  • Source files (your editable theme project)
  • Built output (the dist/ folder that customers get)
As a theme developer, you mainly care that:
  • dist/index.html exists
  • dist/ contains all assets referenced by that HTML

Initial Data Injection

If the built dist/index.html contains <!--initial-data-->, Shoppex injects:
  • window.__SHOPPEX_INITIAL__ = { store, products, groups }
If the placeholder is missing, injection is skipped.

Next Steps

Edge Serving

How published builds are served to customers and what gets cached.

Troubleshooting

If your theme builds but looks wrong in production, start here.
Implementation details (storage providers, edge architecture) are internal and may change. The stable contract is always the same: bun run build must produce a valid dist/.