From b219453f9aea53c5690509bd77ed0cb1c1d11248 Mon Sep 17 00:00:00 2001 From: qmhc <544022268@qq.com> Date: Fri, 19 Jul 2024 00:10:21 +0800 Subject: [PATCH] fix: should parse files option into include fix #337 --- src/plugin.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugin.ts b/src/plugin.ts index 703dc6a..8ddd5d7 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -342,7 +342,11 @@ export function dtsPlugin(options: PluginOptions = {}): import('vite').Plugin { ) } - include = computeGlobs(options.include, content?.raw.include, '**/*') + include = computeGlobs( + options.include, + [...ensureArray(content?.raw.include ?? []), ...ensureArray(content?.raw.files ?? [])], + '**/*' + ) exclude = computeGlobs(options.exclude, content?.raw.exclude, 'node_modules/**') filter = createFilter(include, exclude)