New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bebeal/console-prefix-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bebeal/console-prefix-plugin

A Vite plugin that adds custom prefixes to console.log messages

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

console-prefix-plugin

Adds colored prefixes to console.log messages in Vite builds.

Install

npm install @bebeal/console-prefix-plugin --save-dev

Usage

// vite.config.js
import { defineConfig } from 'vite'
import consolePrefix from '@bebeal/console-prefix-plugin'

export default defineConfig({
  plugins: [
    consolePrefix('[server]') // Default color: magenta
  ]
})
Screenshot 2025-03-22 at 4 04 05 PM

With named color:

import { defineConfig } from 'vite'
import consolePrefix from '@bebeal/console-prefix-plugin'

export default defineConfig({
  plugins: [
    consolePrefix('[api]', 'cyan'),
  ]
})
Screenshot 2025-03-22 at 4 05 25 PM

With raw ANSI color code:

import consolePrefix from '@bebeal/console-prefix-plugin'

export default {
  plugins: [
    consolePrefix('[custom]', '\x1b[38;5;208m') // Custom orange color
  ]
}
Screenshot 2025-03-22 at 4 05 47 PM

Available Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta (default)
  • cyan
  • white
  • gray
  • reset

License

MIT

Keywords

vite

FAQs

Package last updated on 01 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts