electron/patches/node/export_nativemodule.patch

23 строки
715 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Sun, 27 Mar 2016 14:43:14 +0900
Subject: Export NativeModule
This is used by atom for doing module compile cache.
(cherry picked from commit 83b45fddb9a36c1376f7a2b5c70717e37b6f0133)
diff --git a/lib/internal/bootstrap/loaders.js b/lib/internal/bootstrap/loaders.js
index bf63de07613b4d19d95607f404139e587319f11d..b99858fa9df3d817fb7a4614366154e4fbc560c8 100644
--- a/lib/internal/bootstrap/loaders.js
+++ b/lib/internal/bootstrap/loaders.js
@@ -168,6 +168,8 @@ NativeModule.exposeInternals = function() {
}
};
+process.NativeModule = NativeModule;
+
const {
moduleIds,
compileFunction