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 🙏

© 2026 – Pkg Stats / Ryan Hefner

kimi-plugin-inspect-react

v1.0.3

Published

轻量的 Vite 插件,用于在 React 组件渲染的 DOM 上写入源码位置信息,便于在浏览器里定位到对应的文件和行列。

Readme

kimi-plugin-inspect-react

轻量的 Vite 插件,用于在 React 组件渲染的 DOM 上写入源码位置信息,便于在浏览器里定位到对应的文件和行列。

安装

pnpm add kimi-plugin-inspect-react -D
# 或 npm/yarn 均可

使用

import { defineConfig } from 'vite'
import { inspectAttr, inspectDom } from 'kimi-plugin-inspect-react'

export default defineConfig({
  plugins: [
    // 方式一:直接在 JSX 上插入 code-path 属性
    inspectAttr(),

    // 方式二:通过 ref 在真实 DOM 上写入 $codePath 属性
    // inspectDom(),
  ],
})

默认仅在 vite serve 生效(apply: "serve"),构建时不会影响产物。

导出

  • import { inspectAttr } from 'kimi-plugin-inspect-react'
  • import { inspectDom } from 'kimi-plugin-inspect-react/inspectDom'

支持 ESM .mjs 与 CJS .cjs,并提供类型声明。

本地开发与构建

pnpm install
pnpm run build

产物输出到 dist/,包括:

  • inspectAttr.mjs / inspectAttr.cjs 及类型声明
  • inspectDom.mjs / inspectDom.cjs 及类型声明

版权与许可

本项目基于以下开源项目改进而来(保留原声明):

  • @namnode/vite-plugin-inspect-react (MIT License - Copyright (c) 2024 Nam Nguyen)
  • vite-plugin-react-inspector (MIT License)

本项目同样以 MIT License 授权。