Vite plugin that integrates Vite into Shopify theme development. Current stable version is 4.1.2 with support for Vite 5, 6, 7, and 8. It provides automatic entrypoint detection, smart tag generation for scripts and styles, full CDN asset support, and hot reloading via @shopify/theme-hot-reload. Key differentiators: zero-config setup, support for Shopify's strict Liquid parser, and automatic tunnel configuration for development previews. Unlike other Shopify Vite integrations, it handles CORS, modulepreload, and snippet generation out of the box. Release cadence is approximately monthly with minor and patch updates.
npm install vite-plugin-shopifyVerified import paths — ran on the pinned version, not inferred.
Configure vite-plugin-shopify with default options in a Vite config file. All options are optional.
Update @shopify/cli to version >=3.77.0 and follow migration guide for theme-hot-reload.
Use the new syntax with named 'entry:' parameter for compatibility with Shopify's strict Liquid parser.
Upgrade to v4.1.1 or later, or set build.modulePreload to false in Vite config to disable modulepreload.
Upgrade to v4.1.0 or later, or manually configure server.allowedHosts to allow your tunnel domain.
Run 'npm install vite-plugin-shopify --save-dev' (or yarn/pnpm equivalent) and ensure node_modules is present.
Change liquid from 'render 'vite-tag' with 'theme.scss'' to 'render 'vite-tag', entry: 'theme.scss''.
Upgrade to vite-plugin-shopify v4.1.0+ or add the tunnel domain to server.allowedHosts in vite.config.js.