Skip to content

Commit

Permalink
fix mdx-only sources
Browse files Browse the repository at this point in the history
  • Loading branch information
souporserious committed Mar 24, 2024
1 parent e5f4d84 commit 0f9ae00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/mdxts/src/utils/get-all-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
)
Expand Down

0 comments on commit 0f9ae00

Please sign in to comment.