This plugin aim to enhance your dev tools log experience.
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" });
npm i unplugin-better-ts-logVite
// 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()],
})