@open-editor/vite
TypeScript icon, indicating that this package has built-in type declarations

0.9.0ย โ€ขย Publicย โ€ขย Published

@open-editor/vite

NPM version MIT

A vite plugin for fast find source code.

Valid only during development, requires Node.js version 14+.

Install

npm i @open-editor/vite -D

Usage

// vite.config.ts
import OpenEditor from '@open-editor/vite';

export default defineConfig({
  plugins: [
    OpenEditor({
      /* options */
    }),
    // other plugins
  ],
});

Configuration

interface Options {
  /**
   * source rootDir path
   *
   * @default process.cwd()
   */
  rootDir?: string;
  /**
   * render the toggle into the browser
   *
   * @default true
   */
  displayToggle?: boolean;
  /**
   * Disable hover effect from CSS when inspector is enabled
   *
   * @default true
   */
  disableHoverCSS?: boolean;
  /**
   * Ignoring components in some directories, using glob pattern syntax for matching
   *
   * @see https://en.wikipedia.org/wiki/Glob_(programming)
   *
   * @default '\/**\/node_modules\/**\/*'
   */
  ignoreComponents?: string | string[];
  /**
   * exit the check after opening the editor or component tree
   *
   * @default true
   */
  once?: boolean;
  /**
   * Enable interaction between multiple iframes to be promoted to the top-level window.
   *
   * It only takes effect when the top window and iframe window have the same origin.
   *
   * @default false
   */
  crossIframe?: boolean;
  /**
   * custom openEditor handler
   *
   * @default 'launch-editor'
   */
  onOpenEditor?(file: string): void;
}

Playgrounds

Source code Online trial
vite/react StackBlitz
vite/vue StackBlitz
vite/nuxt StackBlitz

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.9.049latest

Version History

VersionDownloads (Last 7 Days)Published
0.9.049
0.8.84
0.8.70
0.8.61
0.8.50
0.8.40
0.8.30
0.8.20
0.7.40
0.7.32
0.7.20
0.7.00
0.6.40
0.6.30
0.6.20
0.6.10
0.6.00
0.5.30
0.5.20
0.5.00
0.4.10
0.4.00
0.3.00
0.2.10
0.2.00
0.1.00
0.0.160
0.0.150
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20

Package Sidebar

Install

npm i @open-editor/vite

Weekly Downloads

56

Version

0.9.0

License

MIT

Unpacked Size

8.64 kB

Total Files

6

Last publish

Collaborators

  • zjxxxxxxxx