Skip to content

4.6.0

Compare
Choose a tag to compare
@alexeagle alexeagle released this 06 Jan 04:47
· 403 commits to stable since this release

To update:

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "ddb78717b802f8dd5d4c01c340ecdc007c8ced5c1df7db421d0df3d642ea0580",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.6.0/rules_nodejs-4.6.0.tar.gz"],
)

or for the core package

http_archive(
    name = "rules_nodejs",
    sha256 = "005c59bf299d15d1d9551f12f880b1a8967fa883654c897907a667cdbb77c7a6",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.6.0/rules_nodejs-core-4.6.0.tar.gz"],
)

and update @bazel-scoped npm packages.

New Feature: faster TypeScript transpiles

We've added an attribute to ts_project called transpiler which lets you swap out which program is used to generate the JavaScript outputs, while still using tsc for type-checking. This pattern lets you decouple type-checking from your development loop, enabling an order of magnitude faster rebuilds, without having to create lots of boilerplate in your BUILD.bazel configs.

As an example, we've been using SWC in some large codebases and saw ~20x speedup in transpilation time. Here's a tiny working example

See the documentation for the transpiler attribute for more info on this.

Thanks to our friends at EngFlow for sponsoring this work!

What's Changed

New Contributors

Full Changelog: 4.5.1...4.6.0