diff --git a/packages/mdxts/src/utils/get-all-data.ts b/packages/mdxts/src/utils/get-all-data.ts index 04516ebe..402c09e0 100644 --- a/packages/mdxts/src/utils/get-all-data.ts +++ b/packages/mdxts/src/utils/get-all-data.ts @@ -113,7 +113,11 @@ export function getAllData({ ) /** If no root index files exist, assume the top-level directory files are public exports. */ - if (!packageJson?.exports && entrySourceFiles.length === 0) { + if ( + typeScriptSourceFiles && + !packageJson?.exports && + entrySourceFiles.length === 0 + ) { entrySourceFiles = project.addSourceFilesAtPaths( join(commonRootPath, '*.{js,jsx,ts,tsx}') )