Skip to content

This plugin aim to enhance your experience with console logging in your frontend. That's simply give you a deep link to the source to the logs. 🎉

License

Notifications You must be signed in to change notification settings

ZoxDev/unplugin-better-ts-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unplugin-better-ts-log

This plugin aim to enhance your dev tools log experience.

How it works ?

Just install the plugin and then your console log should transform with a vscode deeplink :

don't forget to include the files to transform.

		betterTsLog({
      exclude: './node_modules'
			include: './src',
		}),
  • from : console.log(123, ["123"], "123", { test: "test" });
  • to : console.log("from: vscode://file//Users/your-user/projects/unplugin-better-ts-log/src/log.ts:1:1 --> ", 123, ["123"], "123", { test: "test" });

Install

npm i unplugin-better-ts-log
Vite
// vite.config.ts
import Starter from 'unplugin-better-ts-log/vite'

export default defineConfig({
  plugins: [
    Starter({ /* options */ }),
  ],
})

Example: playground/


Rollup
// rollup.config.js
import Starter from 'unplugin-better-ts-log/rollup'

export default {
  plugins: [
    Starter({ /* options */ }),
  ],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-better-ts-log/webpack')({ /* options */ })
  ]
}


Nuxt
// nuxt.config.js
export default defineNuxtConfig({
  modules: [
    ['unplugin-better-ts-log/nuxt', { /* options */ }],
  ],
})

This module works for both Nuxt 2 and Nuxt Vite


Vue CLI
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-better-ts-log/webpack')({ /* options */ }),
    ],
  },
}


esbuild
// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'unplugin-better-ts-log/esbuild'

build({
  plugins: [Starter()],
})


About

This plugin aim to enhance your experience with console logging in your frontend. That's simply give you a deep link to the source to the logs. 🎉

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published