We provide a Vite plugin that automatically starts & stops Sidecar for you when starting your Vite dev server.
npm install @spotlightjs/sidecar --save-dev
pnpm add @spotlightjs/sidecar --save-dev
yarn add @spotlightjs/sidecar --dev
Add the plugin to your Vite config:
import { defineConfig } from 'vite'import spotlightSidecar from '@spotlightjs/sidecar/vite-plugin'; export default defineConfig({ plugins: [spotlightSidecar()],})