Skip to content

Run Sidecar with Vite

We provide a Vite plugin that automatically starts & stops Sidecar for you when starting your Vite dev server.

Terminal window
npm install @spotlightjs/sidecar --save-dev

Add the plugin to your Vite config:

vite.config.js
import { defineConfig } from 'vite'
import spotlightSidecar from '@spotlightjs/sidecar/vite-plugin';
export default defineConfig({
plugins: [spotlightSidecar()],
})