Skip to content

fix: esm-compatibility - #9

Closed
flobacher wants to merge 3 commits into
commitspark:mainfrom
flobacher:main
Closed

fix: esm-compatibility#9
flobacher wants to merge 3 commits into
commitspark:mainfrom
flobacher:main

Conversation

@flobacher

Copy link
Copy Markdown
Contributor

When using commitspark in an esm environment where nodejs loads the files without any further processing from dist/esm this was broken due to

  1. no package.json with type: module
  2. no file-extension on the package-internal imports

This PR should fix that by adding the extensions to the imports.
The ts setting rewriteRelativeImportExtensions: true converts them correctly to js in the output files.

@advancingu

Copy link
Copy Markdown
Contributor

Hi @flobacher, thank you! How much I love the simplicity of the TS/JS build ecosystem... I assume importing .ts directly is the latest way of doing things? I assume the other packages are then all broken, too, correct?

In any case, I did a few additional changes in branch https://github.com/commitspark/git-adapter-github/tree/fix/esm-build that you could review. Thanks.

@advancingu

Copy link
Copy Markdown
Contributor

Merged via #10

@advancingu advancingu closed this Feb 18, 2026
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.

2 participants