Skip to content

Commit

Permalink
build: disable sourcemap generation for all sass binaries (#17291)
Browse files Browse the repository at this point in the history
We need to disable sourcemap generation for all sass binaries
as otherwise the inline source map comment will be inlined into
component `styles` in the release output.

Technically this is not a big deal for AOT compilation where those
source-map strings are omitted anyway, but for JIT it will contribute in
payload size, and with the current state of Angular Package Format, these
source-maps would point to non-existent files anyway.

We should just not generate these sourcemaps/comments similarly
to our Gulp release output.
  • Loading branch information
devversion authored and mmalerba committed Oct 4, 2019
1 parent 6b3f87e commit 230fd2f
Show file tree
Hide file tree
Showing 110 changed files with 246 additions and 180 deletions.
3 changes: 1 addition & 2 deletions src/cdk-experimental/dialog/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite", "sass_binary")

ng_module(
name = "dialog",
Expand Down
4 changes: 0 additions & 4 deletions src/cdk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ rerootedStyles = [file for target in CDK_ENTRYPOINTS_WITH_STYLES for file in [
"%s-prebuilt.css" % target,
target,
],
[
"%s-prebuilt.css.map" % target,
target,
],
]]

# Create genrules which re-root stylesheets from secondary entry-points.
Expand Down
3 changes: 2 additions & 1 deletion src/cdk/a11y/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary", "sass_library")
load(
"//tools:defaults.bzl",
"markdown_to_html",
"ng_module",
"ng_test_library",
"ng_web_test_suite",
"sass_binary",
"sass_library",
)

ng_module(
Expand Down
3 changes: 2 additions & 1 deletion src/cdk/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary", "sass_library")
load("//src/e2e-app:test_suite.bzl", "e2e_test_suite")
load(
"//tools:defaults.bzl",
Expand All @@ -9,6 +8,8 @@ load(
"ng_module",
"ng_test_library",
"ng_web_test_suite",
"sass_binary",
"sass_library",
)

ng_module(
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/scrolling/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load(
"//tools:defaults.bzl",
"markdown_to_html",
"ng_module",
"ng_test_library",
"ng_web_test_suite",
"sass_binary",
)

ng_module(
Expand Down
3 changes: 2 additions & 1 deletion src/cdk/text-field/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary", "sass_library")
load(
"//tools:defaults.bzl",
"markdown_to_html",
"ng_module",
"ng_test_library",
"ng_web_test_suite",
"sass_binary",
"sass_library",
)

ng_module(
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")
load("//tools/dev-server:index.bzl", "dev_server")

ng_module(
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/autocomplete/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "autocomplete",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/badge/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "badge",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/baseline/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "baseline",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/bottom-sheet/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "bottom-sheet",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/button-toggle/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "button-toggle",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/button/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "button",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/card/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "card",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/checkbox/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "checkbox",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/chips/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "chips",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/connected-overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "connected-overlay",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/datepicker/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "datepicker",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/dev-app/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "dev-app",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/dialog/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "dialog",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/drag-drop/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "drag-drop",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/drawer/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "drawer",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/expansion/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "expansion",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/focus-origin/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "focus-origin",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/grid-list/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "grid-list",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/icon/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "icon",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/input/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "input",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/list/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "list",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-button/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-button",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-card/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-card",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-checkbox/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-checkbox",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-chips/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-chips",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-menu/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-menu",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-progress-bar/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-progress-bar",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-radio/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-radio",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-slide-toggle/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-slide-toggle",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/mdc-tabs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "mdc-tabs",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/menu/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "menu",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/paginator/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "paginator",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/portal/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "portal",
Expand Down
3 changes: 1 addition & 2 deletions src/dev-app/progress-bar/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "progress-bar",
Expand Down
Loading

0 comments on commit 230fd2f

Please sign in to comment.