Skip to content

[heft-typescript@next] Add "useTranspilerWorker" option #4120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dmichon-msft
Copy link
Contributor

@dmichon-msft dmichon-msft commented May 17, 2023

Summary

Adds a new option in typescript.json, useTranspilerWorker, that if true, and the tsconfig has isolatedModules: true, will split transpilation into a worker thread and run it in parallel with the type checker.

Details

If opted in and the tsconfig is compatible, will start a worker thread and hand it the list of changed source files and the emit options. Multi-emit then occurs only in the worker, since declaration files are only emitted for the primary module kind.

How it was tested

Local runs on projects in various configurations. Still needs more testing against large projects with isolatedModules: true to determine if the performance is significantly improved.
Verified in both watch and non-watch mode.
Verified using project references.

Impacted documentation

Documentation for typescript.json.

@dmichon-msft dmichon-msft force-pushed the typescript-split-transpile branch from c4cc47f to 3e02f93 Compare May 18, 2023 22:22
@iclanton iclanton merged commit 0654de7 into microsoft:release/heft-0.50.0-rc May 22, 2023
@dmichon-msft dmichon-msft deleted the typescript-split-transpile branch May 23, 2023 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants