npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vite-react-quick-fix-plugin

v1.1.4

Published

A Vite plugin that adds quick-access editor buttons to React components during development

Downloads

837

Readme

vite-react-quick-fix-plugin

A lightweight Vite plugin that enhances React development workflow by adding quick-access editor buttons to your components during development.

Github: https://github.com/LaymanTeam/Vite-React-Quick-Fix-Plugin

🚀 Features

  • Adds a hover-activated "Open in Editor" button to React components in development
  • Alt + Click to quickly jump to component source files
  • Automatically detects React components
  • Supports multiple export types
  • Zero impact on production builds
  • Minimal runtime overhead and Zero-depenency
  • Dev-focused, and only works while in development mode
  • Takes flexible properties so it can work with any IDE that takes a URL file:// entry point
  • Is pure CSS, HTML, and JSX meaning it can work in more scenarios than just CRA

📦 Installation

npm install vite-react-quick-fix-plugin --save-dev
# or
yarn add -D vite-react-quick-fix-plugin

🔧 Usage

Add to your vite.config.ts:

import { defineConfig } from 'vite'
import {reactQuickFix} from 'vite-react-quick-fix-plugin'

export default defineConfig({
  plugins: [
    reactQuickFix({
      editor: 'vscode://file', // default
      baseFilePath: process.cwd() // default
    })
  ]
})

⚙️ Configuration Options

| Option | Type | Default | Description | | ------------ | ------ | --------------- | --------------------------------------- | | editor | string | 'vscode://file' | URL protocol for your editor | | baseFilePath | string | process.cwd() | Base path for resolving component files |

🤔 How It's Different

Unlike ClickToComponent and similar tools that modify the React DevTools or require browser extensions, this plugin:

  • Works directly in your development environment
  • Requires no additional browser extensions
  • Integrates seamlessly with Vite's build process
  • Has zero configuration needed for basic usage
  • Maintains clean production builds with no remnant code

⚠️ Limitations

  • Currently supports VS Code by default (other editors need custom URL protocols)
  • Only detects components with standard React patterns
  • May have minor performance impact on large applications with many components
  • Does not support source maps in the current version, we chose this to handle larger projects quickly

🔍 Requirements

  • Vite 2.x or higher
  • React 16.8+ or Preact X
  • Development environment must support your chosen editor's URL protocol

🤝 Contributing

We welcome contributions! We're particularly interested in:

  • Adding support for more editors
  • Improving component detection
  • Adding tests

For Maintainers

To maintain this plugin, you should be familiar with:

  • Vite's Plugin API
  • React/Preact internals
  • AST manipulation
  • TypeScript
  • Build tooling and bundling

📝 License

CC-BY-NC 2.0

🙏 Credits

Inspired by tools like ClickToComponent while taking a different approach to enhance React development workflow.