Skip to content

sanxin-lin/clear-console-plugins

Repository files navigation

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: '🐷🐷🐷🐷🐷🐷',
      },
    ],
  ],
}

效果

About

让console.log输出的信息更加具有准确性

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published