From 584b42343fcd56174edc7ab43a5d4e44309db7d5 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Tue, 30 Jul 2019 14:32:16 -0700 Subject: [PATCH] build: Do not generate *.umd.min.js for language service (#31917) `language-service.umd.min.js` takes a long time to build (because of running terser), but it is not used at all. See https://unpkg.com/browse/@angular/language-service@8.1.3/package.json where 'main' points to the unminified bundle. PR Close #31917 --- packages/language-service/bundles/rollup.bzl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/language-service/bundles/rollup.bzl b/packages/language-service/bundles/rollup.bzl index 9e0801d7db..73f1cc207b 100644 --- a/packages/language-service/bundles/rollup.bzl +++ b/packages/language-service/bundles/rollup.bzl @@ -14,7 +14,7 @@ load( "ROLLUP_ATTRS", "ROLLUP_DEPS_ASPECTS", "run_rollup", - "run_terser", + # "run_terser", "write_rollup_config", ) load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5") @@ -25,7 +25,8 @@ load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "f # have the path hardcoded in them. _ROLLUP_OUTPUTS = { "build_umd": "%{name}.umd.js", - "build_umd_min": "%{name}.umd.min.js", + # min bundle is not used at the moment. Disable to speed up build + # "build_umd_min": "%{name}.umd.min.js", } DEPS_ASPECTS = [esm5_outputs_aspect] @@ -41,8 +42,15 @@ def _ls_rollup_bundle(ctx): output_format = "amd", ) run_rollup(ctx, esm5_sources, rollup_config, ctx.outputs.build_umd) - source_map = run_terser(ctx, ctx.outputs.build_umd, ctx.outputs.build_umd_min) - return DefaultInfo(files = depset([ctx.outputs.build_umd, ctx.outputs.build_umd_min, source_map])) + + # source_map = run_terser(ctx, ctx.outputs.build_umd, ctx.outputs.build_umd_min) + return DefaultInfo( + files = depset([ + ctx.outputs.build_umd, + # ctx.outputs.build_umd_min, + # source_map, + ]), + ) ls_rollup_bundle = rule( implementation = _ls_rollup_bundle,