aspect_rules_terser 2.1.2Latest published 1.9mo ago
MODULE.bazel
bazel_dep(name = "aspect_rules_terser", version = "2.1.2")
README

Bazel rules for terser

[!NOTE] This repository uses the Aspect CLI for CI and local development. See the docs and install instructions to get started.

terser is a JavaScript minifier.

These rules teach Bazel how to interact with the terser CLI.

Need help? This ruleset has support provided by https://aspect.build/services.

Installation

From the release you wish to use: https://github.com/aspect-build/rules_terser/releases copy the MODULE.bazel snippet into your MODULE.bazel file.

Usage

See the API documentation and the example usage in the examples/ directory.

From a BUILD file

This is the most common usage. See examples/minify

From a macro

You could write a Bazel macro which uses terser, by calling it from a genrule or run_binary. This is illustrated in examples/macro.

From a custom rule

The most advanced usage is to write your own custom rule.

This is a good choice if you need to integrate with other Bazel rules via Providers.

About

Bazel rules for https://terser.org/ - a JavaScript minifier

@aspect-build/rules_terser@aspect-build

Languages

JavaScript31.4%

Maintainers

@jbedard

Compatibility

Versions

2.1.2 +8.3mo2026-06-16
2.1.0 +1.8mo2025-10-09
2.0.1 +12.1mo2025-08-14
2.0.0 +2.8mo2024-08-15
2.0.0-rc0 +<1h2024-05-22
1.0.1 +10.4mo2024-05-22
1.0.0 +10d2023-07-14
0.14.3 +3.1mo2023-07-04
0.14.12023-04-02