      defines = [ "BUILDING_V8_BASE_SHARED" ]
    }
  
-@@ -2355,7 +2355,7 @@ v8_component("v8_libplatform") {
+@@ -2355,7 +2371,7 @@ v8_component("v8_libplatform") {
  
    configs = [ ":internal_config_base" ]
  

     defines = [ "USING_V8_SHARED" ]
   }
   include_dirs = [ "include" ]
@@ -2265,7 +2265,7 @@ v8_component("v8_libbase") {
 
   defines = []
 

 
 declare_args() {
   # Indicate if valgrind was fetched as a custom deps to make it available on
@@ -113,7 +114,13 @@ template("v8_executable") {
 }
 
 template("v8_component") {
-  component(target_name) {
+  if (is_electron_build && !is_component_build &&
+      (target_name == "v8_libbase" || target_name == "v8_libplatform")) {
+    v8_component = "source_set"
+  } else {
+    v8_component = component_electron
+  }
+  target(v8_component, target_name) {
     forward_variables_from(invoker, "*", [ "configs" ])
     configs += invoker.configs
     configs -= v8_remove_configs
