DEV Community

Cover image for [vite plugin]Enhance the readability of console.log()
yuyin
yuyin

Posted on

[vite plugin]Enhance the readability of console.log()

Image description

🔥 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


Enter fullscreen mode Exit fullscreen mode

🦄 Usage

vite.config.ts



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

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


Enter fullscreen mode Exit fullscreen mode

get more information on GitHub Source Code

Top comments (0)