      defines = [ "USING_V8_BASE_SHARED" ]
    }
    libs = []
-@@ -151,7 +151,7 @@ config("libsampler_config") {
+@@ -151,7 +167,7 @@ config("libsampler_config") {
  # This config should only be applied to code using V8 and not any V8 code
  # itself.
  config("external_config") {

   deps = [
     ":v8_libbase",
     "//build/config/sanitizers:deps",
@@ -2498,7 +2502,7 @@ group("gn_all") {
   }
 }
 

diff --git a/BUILD.gn b/BUILD.gn
index 8587356..7433891 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -116,25 +116,41 @@ config("internal_config") {
   if (is_component_build) {
     defines = [ "BUILDING_V8_SHARED" ]
   }
+
+  if (!is_component_build && is_electron_build) {
+    defines = [
+      "BUILDING_V8_BASE_SHARED",
+      "BUILDING_V8_PLATFORM_SHARED",
+      "BUILDING_V8_SHARED",
+    ]
+  }
 }
 
 config("internal_config_base") {
   visibility = [ ":*" ]  # Only targets in this file can depend on this.
 
   include_dirs = [ "." ]
+
+  if (!is_component_build && is_electron_build) {
+    defines = [
+      "BUILDING_V8_BASE_SHARED",
+      "BUILDING_V8_PLATFORM_SHARED",
+      "BUILDING_V8_SHARED",
+    ]
+  }
 }
 
 # This config should be applied to code using the libplatform.
 config("libplatform_config") {
   include_dirs = [ "include" ]
