Vite Integration
Integrate cside with your Vite application using the @cside.dev/vite plugin, with configuration options for React, Vue, Svelte, and other Vite projects.
Installation
Install the cside Vite plugin:
npm i @cside.dev/vite
Setup
Add the cside plugin to your vite.config.js or vite.config.ts:
// vite.config.ts
import { defineConfig } from "vite";
import cside from "@cside.dev/vite";
export default defineConfig({
plugins: [cside({ teamId: "[your-team-id]" })],
});
Your team ID is shown under Team Settings > General in the cside dashboard. Without teamId, the plugin injects the shared https://proxy.csidetm.com/script.js host instead of your team-scoped host.
Configuration Options
The plugin accepts the following configuration options:
teamId(optional) - Your cside team ID. The script is loaded from a team-scoped host (https://{teamId}.csidetm.com/script.js) instead of the default host.fingerprint(optional, defaultfalse) - Load the Device Intelligence script fromcsidefd.cominstead of the default monitoring script. The next release renames this option todeviceIntelligence;fingerprintstays supported as an alias.enabled(optional) - Whether the plugin injects the script. Defaults to enabled for production builds only.
Example with all options:
// vite.config.ts
import { defineConfig } from "vite";
import cside from "@cside.dev/vite";
export default defineConfig({
plugins: [
cside({
teamId: "[your-team-id]",
fingerprint: false,
enabled: true,
}),
],
}); Thanks for your feedback!