Skip to content

Commit 5dd1513

Browse files
committed
fix: prefer using absolute path
1 parent ad4d7d8 commit 5dd1513

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

packages/core/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ const composeEntryConfig = async (
748748
// Turn entries in array into each separate entry.
749749
const globEntryFiles = await glob(entryFiles, {
750750
cwd: root,
751+
absolute: true,
751752
});
752753

753754
// Filter the glob resolved entry files based on the allowed extensions

packages/plugin-dts/src/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ export async function processDtsFiles(
109109
return;
110110
}
111111

112-
const dtsFiles = await glob(convertPath(join(dir, '/**/*.d.ts')));
112+
const dtsFiles = await glob(convertPath(join(dir, '/**/*.d.ts')), {
113+
absolute: true,
114+
});
113115

114116
for (const file of dtsFiles) {
115117
try {

tests/scripts/helper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ export const globContentJSON = async (
1616
path: string,
1717
options?: GlobOptions,
1818
): Promise<Record<string, string>> => {
19-
const files = await glob(convertPath(join(path, '**/*')), options);
19+
const files = await glob(convertPath(join(path, '**/*')), {
20+
absolute: true,
21+
...options,
22+
});
2023
const ret: Record<string, string> = {};
2124

2225
await Promise.all(

0 commit comments

Comments
 (0)