0.1.13 • Published 8 months ago

vite-plugin-simple-vconsole v0.1.13

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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

0.1.12

8 months ago

0.1.13

8 months ago

0.1.11

2 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago