Skip to content

Option+Click React components in your browser to open the source in your editor

License

Notifications You must be signed in to change notification settings

ArnaudBarre/vite-plugin-react-click-to-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

98299ff · Feb 9, 2025

History

9 Commits
Nov 26, 2024
Jan 13, 2025
Feb 9, 2025
Nov 28, 2023
Feb 9, 2025
Oct 24, 2022
Feb 9, 2025
Oct 24, 2022
Feb 26, 2023
Jan 13, 2025
Nov 26, 2024
Feb 9, 2025
Nov 26, 2024

Repository files navigation

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.

About

Option+Click React components in your browser to open the source in your editor

Resources

License

Stars

Watchers

Forks