From 86203736e9d7b510816dad57101ae340db07be9d Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 13 Jul 2018 13:27:50 -0700 Subject: [PATCH] fix(service-worker): don't include sourceMappingURL in ngsw-worker (#24877) Fixes #23596 PR Close #24877 --- packages/service-worker/BUILD.bazel | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/service-worker/BUILD.bazel b/packages/service-worker/BUILD.bazel index 8be9e9c52f..da9adc885f 100644 --- a/packages/service-worker/BUILD.bazel +++ b/packages/service-worker/BUILD.bazel @@ -30,7 +30,9 @@ genrule( name = "ngsw_worker_renamed", srcs = ["//packages/service-worker/worker:ngsw_worker.es6.js"], outs = ["ngsw-worker.js"], - cmd = "cp $< $@", + # Remove sourcemap since this file will be served in production site + # See https://github.com/angular/angular/issues/23596 + cmd = "grep -v '//# sourceMappingURL' < $< > $@", ) ng_package(