      deps = [
        ":v8_base",
        ":v8_libbase",
-@@ -2514,6 +2532,8 @@ v8_executable("mkpeephole") {
+@@ -2514,6 +2516,8 @@ v8_executable("mkpeephole") {
      ":internal_config",
    ]
  

diff --git a/BUILD.gn b/BUILD.gn
index 8895103..69f8bf5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -137,25 +137,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" ]
-  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 = []
@@ -172,7 +188,7 @@ config("libsampler_config") {
 # This config should only be applied to code using V8 and not any V8 code
 # itself.
 config("external_config") {

     sources = [
       "src/v8dll-main.cc",
diff --git a/gni/v8.gni b/gni/v8.gni
index ea628e0000..710f7aaf4d 100644
--- a/gni/v8.gni
+++ b/gni/v8.gni
@@ -4,6 +4,7 @@
