Vite for Shopify themes

Develop with Vite HMR. Build, verify, and deliver a standard Shopify theme through one Theme Run workflow.

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.

Development workflow illustration. The plugin connects your tools; it does not provide a separate editor or storefront UI.

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: dev runs Vite alongside Shopify CLI against the chosen theme.
  • Build: build creates production assets and checks the Mixer, layout render tag, and absence of the Vite development client.
  • Deliver: push builds and verifies before pushing. package builds and verifies, then checks ZIP contents against the packaged files before returning the archive.
  • Diagnose: doctor reports plugin-owned state without changing Git or connecting to a store.
Delivery workflow illustration. Push and package are separate commands with a shared production verification gate.

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.

Product documentation

vite-plugin-shopify-theme documentation
Start with the smallest integration, then understand configuration boundaries, Theme Run, the Mixer lifecycle, and delivery checks.
Install and start development
Install the plugin in the host project, declare a frontend entry, and start Vite with Shopify theme development through Theme Run.
Configuration ownership
Separate host Vite settings, plugin responsibilities, and Shopify CLI options so each fact has one owner, with every plugin option and its default.
Theme Run CLI workflows
Choose a command for development, builds, pushes, packages, merges, diagnostics, or restoration, and understand its delivery boundary.
Mixer Snippet and Git
Understand development and production Mixer forms, the Git-index prerequisite, and restoration after an interrupted run.
Phone and LAN debugging
Make Shopify preview and Vite assets reachable from a device while respecting the boundary between LAN HTTP and remote HTTPS.
Code splitting and theme assets
Decide when to split initial or asynchronous code and verify naming, references, and cleanup in Shopify's flat asset directory.
Troubleshooting
Isolate failures across Theme Target resolution, the dev branch check, target locks, the Mixer, Git state, production checks, and network access.

Get the product

Open source, free to use