Repository navigation
Build and Deployment
Complete guide to building VAST for production and deploying to Shopify.
npm run buildThis command performs two key tasks:
- Runs Vite build - Compiles and minifies JavaScript and CSS
-
Runs Schematic - Compiles all schema files from
src/schema/to section files
After running the build command, you'll find:
-
JavaScript:
assets/[name].[hash].min.js -
CSS:
assets/[name].[hash].min.css -
Vite snippet:
snippets/vite.liquid(auto-generated, gitignored)
The hashed filenames ensure proper cache busting in production. The vite.liquid snippet dynamically references the correct hashed asset files in your Liquid templates.
npm run deploy:devBuilds and pushes to your development environment (requires shopify.theme.toml configuration).
npm run deploy:stagingBuilds and pushes to your staging environment (requires shopify.theme.toml configuration).
npm run deployInteractive deployment to production. This command will prompt you to select which theme to update.
npm run deploy:newCreates a new unpublished theme on Shopify. This is the safest option for testing, as it won't affect any existing themes.
This file configures your Shopify CLI environments. This file is gitignored to protect your store credentials.
Example configuration (auto-create mode):
[environments.development]
store = "your-store-name"
# No theme ID - Shopify CLI creates development theme automaticallyExample configuration (with specific theme IDs):
[environments.development]
store = "your-store-name"
theme = "123456789" # Your development theme ID
[environments.staging]
store = "your-store-name"
theme = "987654321" # Your staging theme ID
ignore = ["templates/*", "config/*"]
[environments.production]
store = "your-store-name"
theme = "111222333" # Your production theme ID
ignore = ["templates/*", "config/*"]Setup Options:
The npm run setup wizard offers three ways to configure your development environment:
- Auto-create (recommended): Omits theme ID, letting Shopify CLI automatically create a development theme
- Use existing: Adds a specific theme ID from your store
- Create new: Creates a new unpublished theme and adds its ID
For detailed information about these options, see Getting Started.
Getting theme IDs manually:
You can find theme IDs by running:
shopify theme listOr in Shopify Admin: Online Store → Themes (theme ID is in the URL when editing a theme).
Main Vite configuration including:
- Shopify Vite plugin setup - Entrypoints and asset generation
- SSL configuration - Self-signed certificates for local HTTPS
- CORS settings - Allow localhost and myshopify.com domains
- Tailwind v4 plugin - CSS processing
-
Public directory syncing - Watches
public/and syncs toassets/ - Liquid file change detection - Triggers page reload on Liquid file changes
Tailwind v4 no longer requires extensive configuration. Most settings are now CSS-based via @theme in your CSS files.
You may still use this file for:
- Plugin configuration
- Custom content paths (if needed beyond defaults)
- Preset extensions
JavaScript and TypeScript configurations for better IDE support and module resolution.
These files provide:
-
Path aliases - Simplify imports with
@/shortcuts - IntelliSense - Better autocomplete in your editor
- Type checking - Catch errors before runtime (TypeScript only)
Always test your build locally before deploying:
npm run build
npm run devThis ensures your production build works correctly in the Shopify environment.
Set up development, staging, and production environments in shopify.theme.toml to avoid accidentally overwriting the wrong theme.
Before deploying to production, consider:
- Creating a duplicate of your live theme as backup
- Using
npm run deploy:newto create a new theme, then publishing it manually - Testing on staging first
Ensure all your changes are committed before deploying:
git status
git add .
git commit -m "Your commit message"This makes it easy to roll back if needed.
After deploying to production:
- Check your live site immediately
- Test critical features (cart, checkout, search)
- Monitor for JavaScript errors in browser console
- Verify all assets loaded correctly (no 404s in Network tab)
VAST supports two deployment approaches—choose whichever fits your workflow best, or use both!
Connect your theme to a GitHub repository for automatic deployment when you push changes.
How it works:
- Push code to GitHub → Shopify automatically syncs changes to your theme
- Great for teams, CI/CD workflows, and version control-first development
-
.gitignoreis configured to work with Shopify's GitHub integration
Setup:
- Push your theme to a GitHub repository
- In Shopify Admin: Online Store → Themes → Add theme → Connect from GitHub
- Select your repository and branch
- Shopify will automatically deploy on every push
Learn more about Shopify GitHub integration
Use CLI commands for direct deployment from your local machine.
How it works:
- Run deployment commands → Theme pushed directly to Shopify
- Great for solo developers, manual control, and testing before deploy
- Uses
shopify.theme.tomlfor environment configuration
When to use:
- Quick manual testing
- Solo development without CI/CD
- Deploying to multiple environments with different configurations
These approaches aren't mutually exclusive! Many developers use:
- GitHub integration for staging/production (automatic deploys)
- CLI push for development (quick manual testing)
- Development Guide - Learn about development workflow and tools
- Configuration Files - Detailed configuration reference
- Architecture - Understand the project structure