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

0.8.2ย โ€ขย Publicย โ€ขย Published

@open-editor/webpack

NPM version MIT

A webpack plugin for fast find source code.

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

Install

npm -D i @open-editor/webpack

Usage

// webpack.config.js
const OpenEditorWebpackPlugin = require('@open-editor/webpack');

module.exports = {
  plugins: [
    new OpenEditorWebpackPlugin({
      /* options */
    }),
    // other plugins
  ],
};

Configuration

interface Options {
  /**
   * source rootDir path
   *
   * @default process.cwd()
   */
  rootDir?: string;
  /**
   * render the toggle into the browser
   *
   * @default true
   */
  displayToggle?: boolean;
  /**
   * set UI color mode
   *
   * @default 'system'
   */
  colorMode?: 'system' | 'light' | 'dark';
  /**
   * Disable hover effect from CSS when inspector is enabled
   *
   * @default true
   */
  disableHoverCSS?: boolean;
  /**
   * The inspector remains rendered when the browser is idle
   *
   * @default true
   */
  retainFrame?: boolean;
  /**
   * exit the check after opening the editor or component tree
   *
   * @default true
   */
  once?: boolean;
  /**
   * custom openEditor handler
   *
   * @default 'launch-editor'
   */
  onOpenEditor?(file: string): void;
}

Playgrounds

Source code Online trial
webpack/react StackBlitz
webpack/nextjs StackBlitz
webpack/vue StackBlitz
webpack/nuxt StackBlitz

Package Sidebar

Install

npm i @open-editor/webpack

Weekly Downloads

12

Version

0.8.2

License

MIT

Unpacked Size

12 kB

Total Files

9

Last publish

Collaborators

  • zjxxxxxxxx