Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions engine/schema/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ export const parsePath = async (
const resolved = await resolveFileExtension(path);
if (resolved) {
resolvedPath = resolved;
} else if (!path.match(/\.(ts|tsx|js|jsx|mjs|cjs|d\.ts|d\.mts|d\.cts)$/)) {
// If resolution failed and path has no extension, return undefined instead of throwing
console.warn(
`%cCould not resolve path ${path}, file not found`,
"color: gray",
);
return Promise.resolve(undefined);
}
}

Expand Down
Loading