Skip to content
Permalink
Browse files

fix(bazel): turn off pure call tree shaking for ng_package (#29210)

PR Close #29210
  • Loading branch information...
gregmagolan authored and matsko committed Mar 13, 2019
1 parent 08231f0 commit 4990b935b4424c3a9373ceee4f38223bd2e0024d
Showing with 7 additions and 0 deletions.
  1. +7 −0 packages/bazel/src/ng_package/ng_package.bzl
@@ -107,6 +107,13 @@ def _rollup(ctx, bundle_name, rollup_config, entry_point, inputs, js_output, for
args.add("--output.name", _global_name(package_name))
args.add("--amd.id", package_name)

# After updating to build_bazel_rules_nodejs 0.27.0+, rollup has been updated to v1.3.1
# which tree shakes @__PURE__ annotations by default. We turn this feature off
# for ng_package as Angular bundles contain these annotations and there are
# test failures if they are removed. See comments in
# https://github.com/angular/angular/pull/29210 for more information.
args.add("--no-treeshake.annotations")

# Note: if the input has external source maps then we need to also install and use
# `rollup-plugin-sourcemaps`, which will require us to use rollup.config.js file instead
# of command line args

0 comments on commit 4990b93

Please sign in to comment.
You can’t perform that action at this time.