Vite Integration
Integrate cside with your Vite application using the @cside.dev/vite plugin.
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({
domain: "your-domain.com",
}),
],
});
Replace your-domain.com
Replace your-domain.com with your actual domain configured in cside.
Configuration Options
The plugin accepts the following configuration options:
domain(required) - Your domain configured in the cside dashboard
Example with all options:
// vite.config.ts
import { defineConfig } from "vite";
import cside from "@cside.dev/vite";
export default defineConfig({
plugins: [
cside({
domain: "your-domain.com",
excludedScripts: ["https://example.com/skip.js"],
}),
],
}); Was this page helpful?
Thanks for your feedback!