Skip to content

perf: switch unconfig-core & mark unrun stable#585

Merged
sxzz merged 7 commits intomainfrom
feat/unrun
Nov 7, 2025
Merged

perf: switch unconfig-core & mark unrun stable#585
sxzz merged 7 commits intomainfrom
feat/unrun

Conversation

@sxzz
Copy link
Copy Markdown
Member

@sxzz sxzz commented Nov 7, 2025

Description

Linked Issues

Additional context

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Nov 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/tsdown@585
npm i https://pkg.pr.new/create-tsdown@585

commit: a48cbb7

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 7, 2025

Deploy Preview for tsdown ready!

Name Link
🔨 Latest commit a48cbb7
🔍 Latest deploy log https://app.netlify.com/projects/tsdown/deploys/690e142a52145e0008350b1d
😎 Deploy Preview https://deploy-preview-585--tsdown.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sxzz sxzz changed the title perf: use unconfig-core perf: use unconfig-core & mark unrun stable Nov 7, 2025
@sxzz sxzz changed the title perf: use unconfig-core & mark unrun stable perf: switch unconfig-core & mark unrun stable Nov 7, 2025
@sxzz sxzz marked this pull request as ready for review November 7, 2025 15:58
@sxzz sxzz merged commit 339f58a into main Nov 7, 2025
17 checks passed
@sxzz sxzz deleted the feat/unrun branch November 7, 2025 15:58
- `native`: Loads TypeScript configuration files using native runtime support. Requires a compatible environment, such as the latest Node.js, Deno, or Bun.
- `unconfig`: Loads configuration files with the `unconfig` library, ensuring broad compatibility across different runtimes.
- `unrun` _(experimental)_: Loads configuration files using the [`unrun`](https://gugustinette.github.io/unrun/) library, which provides similar compatibility as `unconfig` but with more performances. Install the `unrun` package to use this loader.
- `unrun`: Loads configuration files using the [`unrun`](https://gugustinette.github.io/unrun/) library. Install the `unrun` package to use this loader.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Install the unrun package to use this loader.

it's now installed by default as direct runtime dependency.
which reverts the fix made in #570 , @sxzz

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. I will update the docs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

tsdown and unrun will ensure that the rolldown versions remain consistent before release, up until rolldown officially launches its stable version.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I understand, my point is that if I'm using .ts extensions in imports so that don't even need unrun, it's still installed anyway @sxzz

Copy link
Copy Markdown
Member Author

@sxzz sxzz Nov 9, 2025

Choose a reason for hiding this comment

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

Here are the reasons why we currently keep unrun:

  • Node.js 20 does not support importing TypeScript files directly, and it's unreasonable to require users to install additional tools manually.
  • Importing TypeScript files requires an explicit .ts file extension if using native loader, and importing JSON files needs with { type: 'json' }, both of which are incompatible with the current Vite/Vitest config resolver.
  • unrun is lightweight, and both tsdown and unrun rely on the Rolldown engine.
  • Previously, unconfig used jiti by default. Since Rolldown is already used in tsdown, its bundle size is larger than unrun.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ok, thank you for the clarification

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