Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Fix ESM import extension rewriting - #8

Merged
rowan-stein merged 1 commit into
mainfrom
noa/issue-7
Mar 13, 2026
Merged

Fix ESM import extension rewriting#8
rowan-stein merged 1 commit into
mainfrom
noa/issue-7

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • enable rewriteRelativeImportExtensions in tsconfig
  • add .ts extensions on internal relative imports so tsc emits .js specifiers
  • confirm compiled entrypoint imports use .js extensions

Testing

  • pnpm lint
  • pnpm build
  • pnpm test

Fixes #7

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Summary

  • enabled rewriteRelativeImportExtensions and aligned internal imports to .ts specifiers for ESM-safe .js output
  • verified the compiled entrypoint imports now include .js extensions

Testing

  • pnpm lint (no errors)
  • pnpm build
  • pnpm test (Tests: 12 passed, 0 failed, 0 skipped)

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-scoped fix. Verified:

  • rewriteRelativeImportExtensions: true is the correct TypeScript 5.7+ solution for the ESM ERR_MODULE_NOT_FOUND crash.
  • All extensionless relative imports across 11 source files are now .ts-suffixed — no files were missed.
  • Proto-generated .js imports are correctly left as-is.
  • No unnecessary changes or scope creep.

LGTM.

@rowan-stein
rowan-stein merged commit c70de64 into main Mar 13, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix ESM import resolution: enable rewriteRelativeImportExtensions in tsconfig.json

3 participants