Prerequisites
Before using preview mode, ensure you have:- Installed Salla CLI globally
- Created a theme through the Salla Partners Portal
- Have at least one demo store associated with your partner account
You must be in the theme’s root folder to run preview commands.
Starting preview mode
To preview your theme during development:Select a demo store
The CLI will display a list of your demo stores. Select the store where you want to preview the theme.
How preview mode works
The Salla CLI preview mode utilizes the ThemeWatcher plugin configured in webpack:- Monitors file changes in your theme directory
- Automatically syncs changes to the selected demo store
- Triggers browser refresh when assets are updated
- Provides live feedback during development
Development workflow
A typical development workflow with preview mode:Start watch mode
In a separate terminal, run the webpack watch command:This compiles your assets automatically when you make changes.
Preview best practices
Use separate terminals
Run preview mode and watch mode in separate terminal windows:Terminal 1
Terminal 2
Test on multiple devices
The preview URL is accessible from any device on your network. Test your theme on:- Desktop browsers (Chrome, Firefox, Safari)
- Mobile devices (iOS, Android)
- Tablet devices
Monitor webpack output
Pay attention to the webpack watch terminal for:- Compilation errors
- Build warnings
- Asset size information
Common issues
Changes not appearing
If your changes aren’t showing up:- Check that webpack compiled successfully
- Hard refresh your browser (Cmd+Shift+R on Mac, Ctrl+Shift+R on Windows)
- Clear browser cache
- Verify the ThemeWatcher is running in webpack
Preview connection lost
If the connection drops:- Stop the preview command (Ctrl+C)
- Restart with
salla theme preview - Check your internet connection
- Verify you’re still authenticated with Salla CLI
Build errors preventing sync
If webpack fails to compile:- Check the error message in the watch terminal
- Fix the syntax or compilation error
- Wait for webpack to recompile successfully
- Changes will sync once compilation succeeds
Next steps
Build process
Learn about production builds and webpack configuration
Customization
Start customizing your theme