Skip to content

Conversation

smorimoto
Copy link

@smorimoto smorimoto commented Sep 26, 2025

Closes #330

This PR updates tsdown configuration to use tsdown's Auto-Generating Package Exports to support more stable packaging. In addition, we support dual ESM and CJS packages. To achieve this, we've moved away from the node and browser platform configuration and instead use a single neutral platform, marking the node-related dependencies as external dependencies so that we don't have two duplicate tsdown configurations. There is no impact at runtime.

Before After

Signed-off-by: Sora Morimoto <[email protected]>
Signed-off-by: Sora Morimoto <[email protected]>
Signed-off-by: Sora Morimoto <[email protected]>
@smorimoto smorimoto changed the title More stable packaging More Stable Packaging Sep 26, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

@smorimoto smorimoto changed the title More Stable Packaging fix: more stable packaging Sep 26, 2025
@andriiholovan
Copy link

@bgub please check on this

@bgub
Copy link
Owner

bgub commented Oct 3, 2025

@smorimoto @andriiholovan I appreciate the PR, but I have a few concerns.

I like the simplicity of merging configurations into one, but I feel that it "undoes" the purpose of Eta v4. The only change in Eta v4 compared to v3 is that it's ESM-only, because I'm trying to help the ecosystem move forward.

Additionally, making a CJS version of core is probably unnecessary, and TSDown automatically uses the node platform for cjs builds, so neutral won't help.

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.

4.X exports issue in nodejs

3 participants