vite-plugin-timelog
v1.0.8
Published
vite plugin
Readme
vite-plugin-timelog
In the vite dev, automatic reminders of elapsed encoding time in the console.
console the composition of the current project.
📦Install
npm i vite-plugin-timelog -D
yarn i vite-plugin-timelog -D
#recommend
pnpm i vite-plugin-timelog -D🤔How to use
import { defineConfig } from 'vite'
import { VitePluginTimeLog } from 'vite-plugin-timelog'
export default defineConfig({
plugins: [
VitePluginTimeLog({
interval: 1h,
})
]
})TIPS: This plugin will only take effect in dev environment.
🔧Options
intervalInterval time, if the value you pass in is a number, the default unit is seconds, If you are passing in a string, follow the following format:1s1m1h.❗Such use is not allowed:
1h5sYou can only pass one unit in a string.spacedWhether you need to display content more compact.barstyleYou can customize the shape.
export interface Options {
interval: string | number
spaced?: boolean
barstyle?: string
}//example
export default defineConfig({
plugins: [
VitePluginTimeLog({
interval: 5,
spaced: true,
barstyle: "⭐"
})
]
})