From 883f811f9154c0a7efcf599aebc5f05a11c88217 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 14 Dec 2022 13:48:36 -0500 Subject: [PATCH] *Update dist --- dist/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8cd3172..49b44e0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13,13 +13,18 @@ const loaderFunction = `function loadNativeModuleTemp(module, data) { const tempDir = require("os").tmpdir(); const fs = require("fs"); const path = require("path"); - const outputPath = path.join(tempDir, module, "build", "Release"); + const loadPath = path.join(tempDir, module); + const outputPath = path.join(loadPath, "build", "Release"); const modulePath = path.join(outputPath, module + ".node"); fs.mkdirSync(outputPath, { recursive: true }); fs.writeFileSync(modulePath, Buffer.from(data, "base64")); - return modulePath; + if (process.pkg) { + process.pkg = undefined; + } + + return loadPath; }`; function bundleNativeModulesPlugin() { const edits = [];