Vite for Shopify themes
Keep the Shopify theme structure your team knows. Let Vite handle frontend modules and development feedback, while Theme Run connects development, production builds, pushes, and packages to one explicit Theme Target — the theme directory you work on.
What it solves
Stop maintaining separate conventions for development URLs, generated assets, Liquid references, and delivery checks.
- Feedback while you develop. Run Vite and Shopify theme development together, with HMR for frontend modules.
- Assets that connect to Liquid. The generated Mixer Snippet references local Vite assets in development and Shopify assets in production.
- Checks before delivery. Build, push, and package share Theme Target resolution and production verification.
From development to delivery
Choose the command that owns the result you need. Every Theme Run command starts from the Vite project root and uses an explicit --path.
- Develop:
devruns Vite alongside Shopify CLI against the chosen theme. - Build:
buildcreates production assets and checks the Mixer, layout render tag, and absence of the Vite development client. - Deliver:
pushbuilds and verifies before pushing.packagebuilds and verifies, then checks ZIP contents against the packaged files before returning the archive. - Diagnose:
doctorreports plugin-owned state without changing Git or connecting to a store.
For installation and first-run prerequisites, start with Install and start development. For each command's options and completion conditions, read Theme Run CLI workflows.
Who it is for
- Teams developing a standard Shopify theme with a separate frontend source entry;
- Projects that need Vite HMR, modular code, and production builds;
- Teams that want consistent production checks and an explicit Git workflow for generated assets.
If your theme uses only Shopify-native assets, an extra build layer may not help. The documented 0.1.2 release requires Node.js 22.14+, Vite 8, and Shopify CLI. Git-backed themes must prepare the production Mixer in the Git index before development; the setup guide covers this prerequisite and the development branch check.
Responsibility boundaries
Vite owns frontend modules, builds, and server transport. Your project owns the source entry, aliases, and framework choices.
Shopify CLI owns stores, authentication, remote Theme IDs, environments, and native options.
The plugin and Theme Run connect the Theme Target, asset output, Mixer Snippet, reload behavior, and production checks. You keep control of the tools on either side.
Explore configuration, Mixer and Git, or phone and LAN debugging when you need those details. General theme principles remain in the Chinese knowledge base: theme architecture and the theme delivery framework.
License
Use of vite-plugin-shopify-theme is governed by the license in its source repository.