A zero-configuration Vite plugin that seamlessly integrates react-scan into your React development workflow.
- 🚀 Automatic integration of react-scan
- 🔧 Dev server only injection
- 🌐 Uses unpkg CDN for script loading
- 💨 Minimal setup required
- 🔥 Works with HMR
Install the plugin using your preferred package manager:
npm install vite-plugin-react-scan -D
# or
yarn add vite-plugin-react-scan -D
# or
pnpm add vite-plugin-react-scan -D
# or
bun add vite-plugin-react-scan -D
Add the plugin to your vite.config.js
or vite.config.ts
:
import { defineConfig } from 'vite';
import react from '@vitejs/react';
import reactScan from 'vite-plugin-react-scan';
export default defineConfig({
plugins: [
react(),
reactScan()
]
});
- Automatically injects the react-scan script during development
- Only active during the development server
- Adds the script to the body of your HTML
- No manual configuration needed
- Vite
- React
MIT
Contributions are welcome! Please feel free to submit a Pull Request.