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

Use ESM for our executables (tsc, tsserver, typingsInstaller) #51440

Copy link
Copy link
@jakebailey

Description

@jakebailey
Issue body actions

Our libraries are all UMD-ish, because they can be used in Node or in the browser. I didn't change this for the module transform.

However, most of our executables are CJS, as they are only intended to be run within Node. This includes tsc, typingsInstaller, and watchGuard. An exception is tsserver, which contains web code for vscode.dev.

tsc and typingsInstaller both share a lot of code; if they only run on Node anyway, we could potentially raise our minimum Node version to node 12, and ship them as ESM via esbuild's split ESM bundling. If we get vscode.dev off of tsserver (and onto tsserverlibrary), then all three can share code.

In my testing, this reduces our package size by an additional 7 MB, which is a great win.

See also #27891, #32949.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

InfrastructureIssue relates to TypeScript team infrastructureIssue relates to TypeScript team infrastructure

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

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