      defines = [ "USING_V8_SHARED" ]
    }
    include_dirs = [ "include" ]
+@@ -2265,7 +2265,7 @@ v8_component("v8_libbase") {
+ 
+   defines = []
+ 
+-  if (is_component_build) {
++  if (is_component_build || is_electron_build) {
+     defines = [ "BUILDING_V8_BASE_SHARED" ]
+   }
+ 
+@@ -2355,7 +2355,7 @@ v8_component("v8_libplatform") {
+ 
+   configs = [ ":internal_config_base" ]
+ 
+-  if (is_component_build) {
++  if (is_component_build || is_electron_build) {
+     defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
+   }
+ 
 @@ -2423,6 +2423,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
  
      configs = [ ":internal_config" ]

diff --git a/BUILD.gn b/BUILD.gn
index 8587356..c2a5bd7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -113,7 +113,7 @@ config("internal_config") {

     defines = [ "BUILDING_V8_SHARED" ]
   }
 }
@@ -127,14 +127,14 @@ config("internal_config_base") {
 # This config should be applied to code using the libplatform.
 config("libplatform_config") {
   include_dirs = [ "include" ]
-  if (is_component_build) {
+  if (is_component_build || is_electron_build) {
     defines = [ "USING_V8_PLATFORM_SHARED" ]
   }
 }
 
 # This config should be applied to code using the libbase.
 config("libbase_config") {
-  if (is_component_build) {
+  if (is_component_build || is_electron_build) {
     defines = [ "USING_V8_BASE_SHARED" ]
   }
   libs = []
@@ -151,7 +151,7 @@ config("libsampler_config") {
 # This config should only be applied to code using V8 and not any V8 code
 # itself.
