@open-editor/vite
A vite plugin for fast find source code.
Install
npm
npm -D i @open-editor/vite
yarn
yarn -D add @open-editor/vite
pnpm
pnpm -D add @open-editor/vite
Usage
add OpenEditor to vite.config.ts.
it only works for process.env.NODE_ENV === 'development'.
import { defineConfig } from 'vite';
import OpenEditor from '@open-editor/vite';
export default defineConfig({
plugins: [OpenEditor()],
});
press hotkey â¨ď¸ option ⼠+ command â + O, then click the HTML element you wish to inspect.
press hotkey â¨ď¸ command â + đą click, show component tree.
press hotkey â¨ď¸ esc or đą right-click to exit inspect.
Options
| rootDir | string | process.cwd() | source rootDir path |
| displayToggle | boolean | false | render the toggle into the browser |
Playground