Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 1.05 KB

README.md

File metadata and controls

68 lines (52 loc) · 1.05 KB

Vite插件(适用于Vite)

安装

// npm
npm i vite-perfect-console-plugin
// yarn
yarn add vite-perfect-console-plugin
// pnpm
pnpm i vite-perfect-console-plugin

使用

// vite.config.ts

import VitePerfectConsolePlugin from 'vite-perfect-console-plugin'

defineConfig({
  plugins: [
    //...plugins
    // tip 默认是 🐷🐷🐷🐷🐷🐷
    VitePerfectConsolePlugin({ tip: '🐷🐷🐷🐷🐷🐷' }),
  ],
})

效果

Babel插件(适用于Webpack)

安装

// npm
npm i babel-plugin-perfect-console
// yarn
yarn add babel-plugin-perfect-console
// pnpm
pnpm i babel-plugin-perfect-console

使用

// babel.config.js

module.exports = {
  plugins: [
    // ...plugins
    [
      'perfect-console',
      // tip 默认是 🐷🐷🐷🐷🐷🐷
      {
        tip: '🐷🐷🐷🐷🐷🐷',
      },
    ],
  ],
}

效果