Skip to content

Commit

Permalink
feat(bazel): support for terser v5 and 2020 in rollup_bundle rule (#215)
Browse files Browse the repository at this point in the history
* feat(bazel): support for terser v5 and 2020 in rollup_bundle rule

Supports for terser v5 in the `ng_rollup_bundle` rule. currently
terser fails because there is a conflicting `--beautify` CLI flag
set by `@bazel/terser` and the `output` option. Instead, the
new `format` name should be used:

```
ERROR: Please only specify either output or format option, preferrably
format.
```

* fixup! feat(bazel): support for terser v5 and 2020 in rollup_bundle rule

Make output flavor more generic in comment
  • Loading branch information
devversion authored Sep 13, 2021
1 parent b27bfcb commit 6aecdfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bazel/benchmark/ng_rollup_bundle/ng_rollup_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def ng_rollup_bundle(
Runs [rollup], [terser_minified] and [brotli] to produce a number of output bundles.
es2015 : "%{name}.js"
es2015 minified : "%{name}.min.js"
es2015 minified (compressed) : "%{name}.min.js.br",
es2015 minified (debug) : "%{name}.min_debug.js"
JS : "%{name}.js"
JS minified : "%{name}.min.js"
JS minified (compressed) : "%{name}.min.js.br",
JS minified (debug) : "%{name}.min_debug.js"
It registers `@angular-devkit/build-optimizer` as a rollup plugin by default. This helps
with further optimization. See https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/build_optimizer.
Expand Down
4 changes: 2 additions & 2 deletions bazel/benchmark/ng_rollup_bundle/terser_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"output": {
"ecma": "es2015",
"format": {
"ecma": "es2020",
"comments": false,
"beautify": "bazel_debug"
},
Expand Down

0 comments on commit 6aecdfb

Please sign in to comment.