Home / Companies / Aspect Build / Blog / Post Details
Content Deep Dive

10-20x speedup for TypeScript transpilation in Bazel

Blog post from Aspect Build

Post Details
Company
Date Published
Author
Alex Eagle
Word Count
1,085
Company Posts That Month
2
Language
English
Hacker News Points
-
Post removed?
No
Summary

In the development of TypeScript in Bazel, a new Bazel plugin named "ts_project" was created to replace the complex and less compatible "ts_library" rule, offering a simpler and more compatible solution. This new rule, developed with OJ Kwon, utilizes the standard TypeScript compiler (tsc) but initially suffered from slower compilation due to starting a new process for each task. Efforts to introduce a watch mode were unsuccessful in scaling effectively. However, the integration of the SWC transpiler, known for its speed and efficiency regardless of being a new process or in watch mode, has resolved these issues, providing up to a 20x increase in speed over previous methods. Users can now choose their preferred transpiler, such as SWC or Babel, while still relying on tsc for type-checking when necessary. This advancement, supported by EngFlow's sponsorship, is expected to eventually lead to the deprecation of the old ts_library rule, simplifying the TypeScript build process within Bazel.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.