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 🙏

© 2025 – Pkg Stats / Ryan Hefner

lovinsp

v1.4.15

Published

Click the dom on the page, it will open your IDE and position the cursor to the source code location of the dom.

Readme

Lovinsp

Click any DOM element → Jump to source code in your IDE

npm version npm downloads MIT License


Features

  • Click-to-Code: Hold hotkey + click any element to open its source in your IDE
  • Copy Path Mode: Copy file paths for AI-assisted coding workflows
  • Multi-Framework: Vue, React, Svelte, Solid, Astro, Preact, Qwik
  • Multi-Bundler: Vite, Webpack, Rspack, Esbuild, Turbopack, Farm, Mako
  • IDE Support: VSCode, Cursor, WebStorm, and more

Installation

npm install lovinsp
# or
pnpm add lovinsp

Quick Start

Vite

// vite.config.js
import { lovinspPlugin } from 'lovinsp';

export default {
  plugins: [
    lovinspPlugin({ bundler: 'vite' })
  ]
};

Webpack

// webpack.config.js
const { lovinspPlugin } = require('lovinsp');

module.exports = {
  plugins: [
    lovinspPlugin({ bundler: 'webpack' })
  ]
};

Next.js (Turbopack)

// next.config.js
import { lovinspPlugin } from 'lovinsp';

export default {
  turbopack: {
    rules: lovinspPlugin({ bundler: 'turbopack' })
  }
};

Usage

  1. Start your dev server
  2. Hold Option+Shift (Mac) or Alt+Shift (Windows)
  3. Click any element
  4. Your IDE opens at the exact source location

Hotkeys

| Mode | Mac | Windows | |------|-----|---------| | Copy Path | Shift+Option | Shift+Alt | | Open IDE | Shift+Option+Cmd | Shift+Alt+Ctrl |

Configuration

lovinspPlugin({
  bundler: 'vite',           // Required: 'vite' | 'webpack' | 'rspack' | 'esbuild' | 'turbopack' | 'mako'
  editor: 'vscode',          // IDE to open (auto-detected)
  behavior: {
    defaultAction: 'copy',   // 'copy' | 'locate' | 'target' | 'all'
    copy: true,              // Enable copy mode
    locate: true,            // Enable IDE opening
  },
  hotKeys: ['shiftKey', 'altKey'],  // Custom hotkeys
  hideConsole: false,        // Hide console hints
})

Bundler Support

Rspack / Rsbuild

// rspack.config.js
const { lovinspPlugin } = require('lovinsp');

module.exports = {
  plugins: [lovinspPlugin({ bundler: 'rspack' })]
};

Esbuild

const { lovinspPlugin } = require('lovinsp');

esbuild.build({
  plugins: [lovinspPlugin({ bundler: 'esbuild', dev: () => true })]
});

Nuxt

// nuxt.config.js
import { lovinspPlugin } from 'lovinsp';

export default defineNuxtConfig({
  vite: {
    plugins: [lovinspPlugin({ bundler: 'vite' })]
  }
});

Astro

// astro.config.mjs
import { lovinspPlugin } from 'lovinsp';

export default defineConfig({
  vite: {
    plugins: [lovinspPlugin({ bundler: 'vite' })]
  }
});

UmiJS (with Mako)

// .umirc.ts
import { lovinspPlugin } from 'lovinsp';

export default defineConfig({
  mako: {
    plugins: [lovinspPlugin({ bundler: 'mako' })]
  }
});

Vue CLI

// vue.config.js
const { lovinspPlugin } = require('lovinsp');

module.exports = {
  chainWebpack: (config) => {
    config.plugin('lovinsp').use(lovinspPlugin({ bundler: 'webpack' }));
  }
};

Farm

// farm.config.js
import { lovinspPlugin } from 'lovinsp';

export default defineConfig({
  vitePlugins: [lovinspPlugin({ bundler: 'vite' })]
});

Migrating from code-inspector (Cloudsmith)

If you were using code-inspector from a private Cloudsmith registry, follow these steps to migrate to the new lovinsp package on npm:

1. Remove old packages

# Remove old code-inspector packages
pnpm remove code-inspector @code-inspector/core @code-inspector/vite @code-inspector/webpack
# or
npm uninstall code-inspector @code-inspector/core @code-inspector/vite @code-inspector/webpack

2. Clean up .npmrc

Remove or comment out Cloudsmith registry configuration from your .npmrc:

- @code-inspector:registry=https://npm.cloudsmith.io/your-org/your-repo/
- //npm.cloudsmith.io/your-org/your-repo/:_authToken=${CLOUDSMITH_TOKEN}

3. Install lovinsp

pnpm add lovinsp
# or
npm install lovinsp

4. Update imports

- import { codeInspectorPlugin } from 'code-inspector';
+ import { lovinspPlugin } from 'lovinsp';

Or for individual adapters:

- import { vitePlugin } from '@code-inspector/vite';
+ import { vitePlugin } from '@lovinsp/vite';

5. Update configuration

// vite.config.js
- codeInspectorPlugin({ bundler: 'vite' })
+ lovinspPlugin({ bundler: 'vite' })

Package name mapping

| Old (code-inspector) | New (lovinsp) | |---------------------|---------------| | code-inspector | lovinsp | | @code-inspector/core | @lovinsp/core | | @code-inspector/vite | @lovinsp/vite | | @code-inspector/webpack | @lovinsp/webpack | | @code-inspector/esbuild | @lovinsp/esbuild | | @code-inspector/turbopack | @lovinsp/turbopack | | @code-inspector/mako | @lovinsp/mako |

API compatibility

The API remains 100% compatible. Only the package names and import paths have changed. All configuration options work exactly the same.

Packages

| Package | Description | |---------|-------------| | lovinsp | Main plugin (use this) | | @lovinsp/core | Core logic | | @lovinsp/vite | Vite adapter | | @lovinsp/webpack | Webpack adapter | | @lovinsp/esbuild | Esbuild adapter | | @lovinsp/turbopack | Turbopack adapter | | @lovinsp/mako | Mako adapter |

Credits

Based on code-inspector by @zh-lx.

License

MIT