yuyinws / vite-plugin-turbo-console

πŸš€ Enhance the ability of `console.log()`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ”₯ Features

  • Support printing the file name, line number and variable name.

  • Support background highlighting of different files. (Currently supporting .js(x), .ts(x), .vue, .svelte, and .astro)

πŸ“¦ Install

# npm
npm install -D vite-plugin-turbo-console
# yarn
yarn add -D vite-plugin-turbo-console
# pnpm
pnpm i -D vite-plugin-turbo-console

πŸ¦„ Usage

vite.config.ts

import { defineConfig } from "vite";
import TurboConsole from "vite-plugin-turbo-console";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [TurboConsole()],
});

❀️ Credits

Inspired by babel-plugin-enhance-log and turbo-console-log

About

πŸš€ Enhance the ability of `console.log()`

License:MIT License


Languages

Language:Vue 62.0%Language:TypeScript 22.7%Language:CSS 13.1%Language:HTML 1.7%Language:JavaScript 0.4%