vite-plugin-simple-vconsole
TypeScript icon, indicating that this package has built-in type declarations

0.1.13 • Public • Published

vite-plugin-simple-vconsole npm

vConsole plugin for vite, support both MPA and SPA.

Install

yarn add vite-plugin-simple-vconsole -D
# or
npm i vite-plugin-simple-vconsole -D

Example

See example

cd example

# yarn
yarn
yarn dev

# pnpm
pnpm i
pnpm dev

Usage

// vite.config.js
import vConsolePlugin from 'vite-plugin-simple-vconsole'

export default {
  plugins: [
    vConsolePlugin({
      enable: true,
    }),
  ]
}
interface VConsolePluginOptions {
    enable?: boolean;
    src?: string; // cdn url, default is https://unpkg.com/vconsole@latest/dist/vconsole.min.js
    theme?: 'light' | 'dark';
    injectTo?: 'head' | 'body'; // default 'head'
}

Options

enable

  • Type: boolean
  • Default: false

src

  • Type: string
  • Default: 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js'

this script will be injected to body of the entry html

theme

  • Type: 'light' | 'dark'
  • Default: 'light'

vConosle theme

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.132latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.132
0.1.120
0.1.115
0.1.108
0.1.93
0.1.80
0.1.70

Package Sidebar

Install

npm i vite-plugin-simple-vconsole

Weekly Downloads

11

Version

0.1.13

License

MIT

Unpacked Size

6.02 kB

Total Files

6

Last publish

Collaborators

  • heflyaway