Skip to content

Commit 95be69d

Browse files
committed
perf: reuse dts regex
1 parent 8dfcd2a commit 95be69d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/features/report.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { promisify } from 'node:util'
44
import { brotliCompress, gzip } from 'node:zlib'
55
import { bold, dim, green } from 'ansis'
66
import Debug from 'debug'
7+
import { RE_DTS } from 'rolldown-plugin-dts'
78
import { formatBytes } from '../utils/format'
89
import { noop } from '../utils/general'
910
import { logger, prettyFormat, prettyName } from '../utils/logger'
@@ -13,8 +14,6 @@ const debug = Debug('tsdown:report')
1314
const brotliCompressAsync = promisify(brotliCompress)
1415
const gzipAsync = promisify(gzip)
1516

16-
const RE_DTS = /\.d\.[cm]?ts$/
17-
1817
interface SizeInfo {
1918
filename: string
2019
dts: boolean

0 commit comments

Comments
 (0)