refactor(devtools): fix browser-specific styles infra · gregorycode/angular@ed3dc10 · GitHub
Skip to content

Commit ed3dc10

Browse files
hawkgsatscott
authored andcommitted
refactor(devtools): fix browser-specific styles infra
Fix browser-specific styles infrastructure. PR angular#62786 cleans up part of the code, but there are still services that attempt to load these stylesheets on `main`.
1 parent 786ea44 commit ed3dc10

5 files changed

Lines changed: 41 additions & 3 deletions

File tree

devtools/projects/ng-devtools/src/styles/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Chrome-specific global styles */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Firefox-specific global styles */

devtools/projects/shell-browser/src/BUILD.bazel

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//devtools/tools:defaults.bzl", "esbuild", "extension_package", "ng_project", "sass_binary", "string_flag", "ts_project")
1+
load("//devtools/tools:defaults.bzl", "copy_to_directory", "esbuild", "extension_package", "ng_project", "sass_binary", "string_flag", "ts_project")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -10,6 +10,18 @@ sass_binary(
1010
deps = ["//devtools/projects/ng-devtools/src/styles:global"],
1111
)
1212

13+
copy_to_directory(
14+
name = "browser_specific_styles",
15+
srcs = [
16+
"//devtools/projects/ng-devtools/src/styles:chrome",
17+
"//devtools/projects/ng-devtools/src/styles:firefox",
18+
],
19+
out = "styles",
20+
replace_prefixes = {
21+
"devtools/projects/ng-devtools/src/styles": "",
22+
},
23+
)
24+
1325
ts_project(
1426
name = "devtools",
1527
srcs = [
@@ -72,6 +84,7 @@ exports_files(["index.html"])
7284
filegroup(
7385
name = "prod_app_static_files",
7486
srcs = [
87+
":browser_specific_styles",
7588
":index.html",
7689
":shell_common_styles",
7790
],

devtools/src/BUILD.bazel

Lines changed: 14 additions & 1 deletion

0 commit comments

Comments
 (0)