diff --git a/patches/ui-webui-resources-tools-bundle_js.gni.patch b/patches/ui-webui-resources-tools-bundle_js.gni.patch new file mode 100644 index 00000000000..363827fb49f --- /dev/null +++ b/patches/ui-webui-resources-tools-bundle_js.gni.patch @@ -0,0 +1,12 @@ +diff --git a/ui/webui/resources/tools/bundle_js.gni b/ui/webui/resources/tools/bundle_js.gni +index 6ef57e0cd1de46342a9fc8892fb121b7b2222265..79fb3fbc77e63eb4a9914c094ce7a3882a8aa904 100644 +--- a/ui/webui/resources/tools/bundle_js.gni ++++ b/ui/webui/resources/tools/bundle_js.gni +@@ -102,6 +102,7 @@ template("bundle_js") { + external_paths += [ "//resources/polymer/v3_0/|$polymer_path" ] + + if (!is_chrome_untrusted) { ++ brave_resources_path = rebase_path("$root_gen_dir/brave/ui/webui/resources/tsc/", root_build_dir) external_paths += [ "chrome://resources/brave/|$brave_resources_path", "//resources/brave/|$brave_resources_path" ] + external_paths += [ "chrome://resources/|$resources_path" ] + } + external_paths += [ "//resources/|$resources_path" ] diff --git a/patches/ui-webui-resources-tools-optimize_webui.gni.patch b/patches/ui-webui-resources-tools-optimize_webui.gni.patch index 76408452b3a..e7d3362cd75 100644 --- a/patches/ui-webui-resources-tools-optimize_webui.gni.patch +++ b/patches/ui-webui-resources-tools-optimize_webui.gni.patch @@ -1,20 +1,12 @@ diff --git a/ui/webui/resources/tools/optimize_webui.gni b/ui/webui/resources/tools/optimize_webui.gni -index 697a4526bbe325d72890d9cdecdde5e01f32b042..1344c74bcee1ec89f031823a65064ca6bc02d388 100644 +index 697a4526bbe325d72890d9cdecdde5e01f32b042..c738715ef3be48d12293189f13cb6d0d4d0f86a7 100644 --- a/ui/webui/resources/tools/optimize_webui.gni +++ b/ui/webui/resources/tools/optimize_webui.gni -@@ -64,6 +64,7 @@ template("optimize_webui") { - rebase_path("$root_gen_dir/ui/webui/resources/tsc/", root_build_dir) - is_chrome_untrusted = - string_replace(invoker.host, "chrome-untrusted://", "") != invoker.host -+ brave_resources_path = rebase_path("$root_gen_dir/brave/ui/webui/resources/tsc/", root_build_dir) +@@ -83,6 +83,7 @@ template("optimize_webui") { + external_paths += [ "//resources/polymer/v3_0/|$polymer_path" ] - external_paths = [] - if (is_chromeos_ash) { -@@ -86,6 +87,7 @@ template("optimize_webui") { + if (!is_chrome_untrusted) { ++ brave_resources_path = rebase_path("$root_gen_dir/brave/ui/webui/resources/tsc/", root_build_dir) external_paths += [ "chrome://resources/brave/|$brave_resources_path", "//resources/brave/|$brave_resources_path" ] external_paths += [ "chrome://resources/|$resources_path" ] } external_paths += [ "//resources/|$resources_path" ] -+ external_paths += [ "chrome://resources/brave/|$brave_resources_path", "//resources/brave/|$brave_resources_path" ] - - if (defined(invoker.external_paths)) { - external_paths += invoker.external_paths