Skip to content

Commit 4fe0b4e

Browse files
committed
chore: update
1 parent 8c3001e commit 4fe0b4e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/scripts/shared.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,17 @@ export async function getResults(
155155
key = currentFormatCount === 1 ? format : `${format}${currentFormatIndex}`;
156156

157157
let globFolder = '';
158+
const distPath =
159+
typeof libConfig?.output?.distPath === 'string'
160+
? libConfig?.output?.distPath
161+
: libConfig?.output?.distPath?.root!;
158162
if (type === 'js' || type === 'css') {
159-
globFolder = libConfig?.output?.distPath?.root!;
163+
globFolder = distPath;
160164
} else if (type === 'dts' && libConfig.dts !== false) {
161165
globFolder =
162166
libConfig.dts === true
163-
? libConfig?.output?.distPath?.root!
164-
: (libConfig.dts?.distPath! ?? libConfig?.output?.distPath?.root!);
167+
? distPath
168+
: (libConfig.dts?.distPath! ?? distPath);
165169
}
166170

167171
if (!globFolder) continue;

0 commit comments

Comments
 (0)