Click any DOM element → Jump to source code in your IDE
Vue · React · Svelte · Solid · Astro · Preact · Qwik
- 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
npm install lovinsp
# or
pnpm add lovinsp// vite.config.js
import { lovinspPlugin } from 'lovinsp';
export default {
plugins: [
lovinspPlugin({ bundler: 'vite' })
]
};// webpack.config.js
const { lovinspPlugin } = require('lovinsp');
module.exports = {
plugins: [
lovinspPlugin({ bundler: 'webpack' })
]
};// next.config.js
import { lovinspPlugin } from 'lovinsp';
export default {
turbopack: {
rules: lovinspPlugin({ bundler: 'turbopack' })
}
};- Start your dev server
- Hold
Option+Shift(Mac) orAlt+Shift(Windows) - Click any element
- Your IDE opens at the exact source location
| Mode | Mac | Windows |
|---|---|---|
| Copy Path | Shift+Option |
Shift+Alt |
| Open IDE | Shift+Option+Cmd |
Shift+Alt+Ctrl |
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
})All bundler configurations
// rspack.config.js
const { lovinspPlugin } = require('lovinsp');
module.exports = {
plugins: [lovinspPlugin({ bundler: 'rspack' })]
};const { lovinspPlugin } = require('lovinsp');
esbuild.build({
plugins: [lovinspPlugin({ bundler: 'esbuild', dev: () => true })]
});// nuxt.config.js
import { lovinspPlugin } from 'lovinsp';
export default defineNuxtConfig({
vite: {
plugins: [lovinspPlugin({ bundler: 'vite' })]
}
});// astro.config.mjs
import { lovinspPlugin } from 'lovinsp';
export default defineConfig({
vite: {
plugins: [lovinspPlugin({ bundler: 'vite' })]
}
});// .umirc.ts
import { lovinspPlugin } from 'lovinsp';
export default defineConfig({
mako: {
plugins: [lovinspPlugin({ bundler: 'mako' })]
}
});// vue.config.js
const { lovinspPlugin } = require('lovinsp');
module.exports = {
chainWebpack: (config) => {
config.plugin('lovinsp').use(lovinspPlugin({ bundler: 'webpack' }));
}
};// farm.config.js
import { lovinspPlugin } from 'lovinsp';
export default defineConfig({
vitePlugins: [lovinspPlugin({ bundler: 'vite' })]
});If you were using code-inspector from a private Cloudsmith registry, follow these steps to migrate to the new lovinsp package on npm:
# 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/webpackRemove 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}pnpm add lovinsp
# or
npm install lovinsp- import { codeInspectorPlugin } from 'code-inspector';
+ import { lovinspPlugin } from 'lovinsp';Or for individual adapters:
- import { vitePlugin } from '@code-inspector/vite';
+ import { vitePlugin } from '@lovinsp/vite';// vite.config.js
- codeInspectorPlugin({ bundler: 'vite' })
+ lovinspPlugin({ bundler: 'vite' })| 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 |
The API remains 100% compatible. Only the package names and import paths have changed. All configuration options work exactly the same.
| 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 |
Based on code-inspector by @zh-lx.
MIT
