Skip to content

Commit 0b18c53

Browse files
authored
perf: replace debug with obug (#13)
1 parent dc5ff2f commit 0b18c53

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ dist
7979

8080
# IDE
8181
.idea
82+
83+
tsconfig.tsbuildinfo

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
},
5151
"dependencies": {
5252
"cac": "^6.7.14",
53-
"debug": "^4.4.3",
5453
"es-module-lexer": "^1.7.0",
54+
"obug": "^2.0.0",
5555
"pathe": "^2.0.3",
5656
"vite": "^7.2.0"
5757
},
@@ -61,7 +61,6 @@
6161
"@rollup/plugin-commonjs": "^29.0.0",
6262
"@rollup/plugin-json": "^6.1.0",
6363
"@rollup/plugin-node-resolve": "^16.0.3",
64-
"@types/debug": "^4.1.12",
6564
"@types/node": "^24.10.0",
6665
"bumpp": "^10.3.1",
6766
"eslint": "^9.39.1",

pnpm-lock.yaml

Lines changed: 16 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { dirname, resolve } from 'node:path'
55
import process from 'node:process'
66
import { fileURLToPath, pathToFileURL } from 'node:url'
77
import vm from 'node:vm'
8-
import createDebug from 'debug'
8+
import { createDebug } from 'obug'
99
import { extractSourceMap } from './source-map'
1010
import {
1111
cleanUrl,

src/hmr/hmr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { HMRPayload, Update } from 'vite/types/hmrPayload.js'
55
import type { ViteNodeRunner } from '../client'
66
import type { HotContext } from '../types'
77
import type { HMREmitter } from './emitter'
8-
import createDebug from 'debug'
8+
import { createDebug } from 'obug'
99
import c from 'tinyrainbow'
1010
import { normalizeRequestId } from '../utils'
1111

src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { existsSync } from 'node:fs'
1111
import { performance } from 'node:perf_hooks'
1212
import process from 'node:process'
1313
import { pathToFileURL } from 'node:url'
14-
import createDebug from 'debug'
14+
import { createDebug } from 'obug'
1515
import { join, normalize, relative, resolve } from 'pathe'
1616
import { version as viteVersion } from 'vite'
1717
import { Debugger } from './debug'

0 commit comments

Comments
 (0)