npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vite-plugin-pconsole

v0.0.2

Published

> 让开发调试信息变得更优雅的 Vite 插件

Readme

🎉 Vite Plugin Fancy Console 使用指南

让开发调试信息变得更优雅的 Vite 插件

📦 安装

npm install vite-plugin-pconsole --save-dev
# 或
yarn add vite-plugin-pconsole -D

🚀 快速开始

// vite.config.js
import { defineConfig } from 'vite'
import {fancyPlugin} from 'vite-plugin-pconsole'

export default defineConfig({
  plugins: [
    fancyPlugin({
      icon: '🐳',  // 自定义前缀图标
      timeFormat: 'HH:mm:ss',  // 时间显示格式
      showFileName: true,  // 显示文件名
      showLineNumber: true  // 显示行号
    })
  ]
})

🔧 配置选项

| 参数 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | icon | string | 🐳 | 自定义前缀图标 | | timeSeparator | string | - | 时间与日志内容之间的分隔符 | | fileLineSeparator | string | : | 文件名与行号之间的分隔符 | | styles | object | {} | 自定义样式配置 | | prefix | string | `` | 日志输出前缀 | | root | string | process.cwd() | 项目根目录 | | silentProduction | boolean | false | 生产环境是否静默输出 | | exclude | string[] | [/node_modules/] | 排除的文件路径,支持正则表达式 | | include | string[] | [/.(js|ts|jsx|tsx|vue)$/] | 包含的文件路径,支持正则表达式 | | timeFormat | string | YYYY-MM-DD HH:mm:ss | 时间显示格式 | | showFileName | boolean | false | 是否显示文件名 | | showLineNumber | boolean | false | 是否显示行号 |

高级样式配置

// 颜色配置示例
{
  styles: {
    log: '#1890ff',    // 蓝色
    info: '#52c41a',   // 绿色
    warn: '#faad14',   // 橙色
    error: '#ff4d4f'   // 红色
  }
}

| 参数 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | log | string | #1890ff | 日志颜色 | | info | string | #52c41a | 信息颜色 | | warn | string | #faad14 | 警告颜色 | | error | string | #ff4d4f | 错误颜色 |

🎨 使用示例

const MENU_ITEMS = [
  { key: '1', label: '实验室简介', component: 'Tech' },
  { key: '2', label: '研究方向', component: 'Pos' },
  { key: '3', label: '规章制度', component: 'Zd' },
  { key: '4', label: '联系我们', component: 'Contact' },
]
console.log(MENU_ITEMS)
console.warn(MENU_ITEMS)
console.error(MENU_ITEMS)
console.info(MENU_ITEMS)
console.debug(MENU_ITEMS)

📌 效果展示

image

📝 贡献指南

欢迎提交 Pull Request 或 Issue,共同改进这个项目。

仓库地址

vite-plugin-fancy