DEV Community

Cover image for [Vite plugin] Jump to the editor by clicking console.log output.
yuyin
yuyin

Posted on

[Vite plugin] Jump to the editor by clicking console.log output.

Vite-plugin-turbo-console is a Vite plugin for enhancing console.log().
Its main features include:

🔥 Features

  1. Output console.log content highlighted according to file type.
  2. Jump to editor from console by simple click.

🎥 Screen Recording

gif

📦 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

vite.config.ts

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

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    TurboConsole({
      /* options here */
    })
  ],
});
Enter fullscreen mode Exit fullscreen mode

Nuxt

nuxt.config.ts

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  modules: [
    'vite-plugin-turbo-console/nuxt'
  ],
  turboConsole: {
    /* options here */
  }
})

Enter fullscreen mode Exit fullscreen mode

Check the more information on GitHub

Welcome to use and feedback:)

Top comments (0)