@ruijadom/telescope-vite
v0.1.1
Published
Vite plugin for Telescope integration
Maintainers
Readme
@ruijadom/telescope-vite
Vite plugin for Telescope integration.
Installation
npm install --save-dev @ruijadom/telescope-viteUsage
Add the plugin to your vite.config.ts:
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { telescopePlugin } from '@ruijadom/telescope-vite';
export default defineConfig({
plugins: [
react(),
telescopePlugin()
]
});Configuration
Pass options to customize Telescope:
telescopePlugin({
// Server configuration
port: 3737,
host: 'localhost',
// Enable/disable in development
enabled: true,
// Editor configuration
editor: {
name: 'cursor',
command: 'cursor',
args: ['-g']
}
})What It Does
- Injects Telescope browser runtime into your app
- Starts WebSocket server for browser-editor communication
- Transforms components to add metadata
- Preserves source maps for accurate navigation
Requirements
- Vite 4.0+ or 5.0+
- React 16.8+
Documentation
For full documentation, see the main Telescope repository.
License
MIT
