Skip to content

Commit 9164898

Browse files
committed
Fix issue where a typescript file with only types causes indexing to fail
1 parent 376a0c5 commit 9164898

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cli-v3/src/indexing/registerTasks.ts

+4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ async function tryImport(path: string): Promise<Result<any>> {
6262
function getExportNames(module: any) {
6363
const exports: string[] = [];
6464

65+
if (!module) {
66+
return exports;
67+
}
68+
6569
const exportKeys = Object.keys(module);
6670

6771
if (exportKeys.length === 0) {

0 commit comments

Comments
 (0)