Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat!: migrate build to pure ESM and TypeScript#310

Merged
antfu merged 2 commits into
Rich-Harris:masterRich-Harris/magic-string:masterfrom
sxzz:feat/ts-esmsxzz/magic-string:feat/ts-esmCopy head branch name to clipboard
Jul 16, 2026
Merged

feat!: migrate build to pure ESM and TypeScript#310
antfu merged 2 commits into
Rich-Harris:masterRich-Harris/magic-string:masterfrom
sxzz:feat/ts-esmsxzz/magic-string:feat/ts-esmCopy head branch name to clipboard

Conversation

@sxzz

@sxzz sxzz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

closes #309, closes #301

@sxzz
sxzz marked this pull request as ready for review July 16, 2026 06:16
@sxzz sxzz changed the title Migrate build to tsdown and TypeScript feat!: migrate build to tsdown and TypeScript Jul 16, 2026
@sxzz sxzz changed the title feat!: migrate build to tsdown and TypeScript feat!: migrate build to ESM only and TypeScript Jul 16, 2026
@sxzz sxzz changed the title feat!: migrate build to ESM only and TypeScript feat!: migrate build to pure ESM and TypeScript Jul 16, 2026
Comment thread tsdown.config.ts
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'

export default defineConfig({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now that we don't need a bundle, can you explain tsdown's use here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  1. Remove the DEBUG variable
  2. Before this PR, magic-string is shipping single file for each format, instead of multiple files.

@43081j

43081j commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

A big chunk of this seems to be formatting changes. It would be better to leave the formatting as is (prettier defaults) I think. Then suggest that in its own change if still wanted.

Otherwise lots of good here 🎉 Will finish reading through it today

@sxzz

sxzz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@43081j Now the first commit is TS refactoring and the second one is formatting only.

@antfu
antfu merged commit 0e22897 into Rich-Harris:master Jul 16, 2026
3 checks passed
@sxzz
sxzz deleted the feat/ts-esm branch July 16, 2026 10:31
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.

Migrate to ESM only Adopt module-sync?

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.