Skip to main content
Installation
Language

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, default false) - Load the Device Intelligence script from csidefd.com instead of the default monitoring script. The next release renames this option to deviceIntelligence; fingerprint stays 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,
		}),
	],
});
Was this page helpful?