🐝 vite-plugin-splitbee
A small plugin to add Splitbee support to Vite
🦄 Usage
Install the dependency
npm install --save-dev vite-plugin-splitbee # yarn add -D vite-plugin-splitbee
Add it to your Vite config
// vite.config.ts
import { ViteSplitbee } from 'vite-plugin-splitbee';
export default {
plugins: [
ViteSplitbee(),
]
}
🔧 Configuration
export default {
plugins: [
ViteSplitbee({
/// When using A/B testing, you can prevent the initial content flash by making the script blocking/synchronous (Optional) [Default: true]
async: true,
/// Whether to include Splitbee analytics during local development (Optional) [Default: false]
dev: false,
/// Number of milliseconds to wait before loading the Splitbee (Optional) [Default: 0]
delay_timeout: 0,
}),
]
}
⚠️ Requirements
Currently this plugin only supports Vite 2.x