Skip to content

fix: Point package main to the compiled JavaScript entry - #215

Merged
bennycode merged 1 commit into
mainfrom
fix/package-main
Oct 1, 2026
Merged

bennycode merged 1 commit into
mainfrom
fix/package-main

Conversation

@bennycode

Copy link
Copy Markdown
Owner

"main" in package.json pointed to dist/src/converter/convertProject.ts, but the build only emits .js and .d.ts files there. Importing ts2esm as a library (import {convertProject} from 'ts2esm') therefore failed; only the CLI worked.

"main" now points to convertProject.js. TypeScript finds the types in the .d.ts file next to it.

"main" referenced dist/src/converter/convertProject.ts, which the build never creates, so importing ts2esm as a library failed. It now points to the compiled .js file, next to which TypeScript also finds the .d.ts types.
@bennycode
bennycode merged commit 8497af1 into main Oct 1, 2026
2 checks passed
@bennycode
bennycode deleted the fix/package-main branch October 1, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant