Skip to content

Commit 135776e

Browse files
committed
fix: dts detection
1 parent eeba924 commit 135776e

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"chokidar": "^3.5.2",
6666
"debug": "^4.3.2",
6767
"fast-glob": "^3.2.7",
68-
"has-pkg": "^0.0.1",
68+
"local-pkg": "^0.1.0",
6969
"magic-string": "^0.25.7",
7070
"minimatch": "^3.0.4",
7171
"resolve": "^1.20.0",

pnpm-lock.yaml

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

src/core/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { join, resolve } from 'path'
22
import { slash, toArray } from '@antfu/utils'
3-
import hasPkg from 'has-pkg'
3+
import { isPackageExists } from 'local-pkg'
44
import { ResolvedOptions, Options } from '../types'
55
import { LibraryResolver } from './helpers/libraryResolver'
66

77
export const defaultOptions: Omit<Required<Options>, 'include' | 'exclude' | 'transformer' | 'globs'> = {
88
dirs: 'src/components',
99
extensions: 'vue',
1010
deep: true,
11-
dts: hasPkg('typescript'),
11+
dts: isPackageExists('typescript'),
1212

1313
directoryAsNamespace: false,
1414
globalNamespaces: [],

0 commit comments

Comments
 (0)