Skip to content

Conversation

@dsherret
Copy link

@dsherret dsherret commented Jan 9, 2026

Not sure what's up with this file appearing twice (probably compat for before exports existed? Is it still worth having?), but this is a hacky fix for the default export being wrong.

The fix is to just write the declaration files using export = instead of esm exports because typescript resolves these as cjs. This makes the package work now when imported from ESM.

image

Closes #443

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: e5ff19f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-render-to-string Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dsherret dsherret changed the title fix: use cjs types instead of esm for jsx export to fix default export from esm fix: use cjs types instead of esm for jsx export Jan 9, 2026
@dsherret dsherret changed the title fix: use cjs types instead of esm for jsx export fix: use export = instead of esm exports for jsx export types Jan 9, 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.

ESM types are described incorrectly

2 participants