vite-plugin-react-click-to-component
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

vite-plugin-react-click-to-component npm

Option+Right Click in your browser to open the source in your editor.

demo

Installation

npm i -D vite-plugin-react-click-to-component

In your Vite config:

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc"; // or @vitejs/plugin-react
import { reactClickToComponent } from "vite-plugin-react-click-to-component";

export default defineConfig({
  plugins: [react(), reactClickToComponent()],
});

Inspiration

This plugin is a light version of ericclemmons/click-to-component that uses Vite's launch editor middleware to open the source code in your currently running editor. This also benefits from Vite's transformIndexHtml hook so that you don't need to modify your source code.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i vite-plugin-react-click-to-component

      Weekly Downloads

      3,563

      Version

      3.0.0

      License

      MIT

      Unpacked Size

      9.13 kB

      Total Files

      7

      Last publish

      Collaborators

      • arnaud-barre