From 8f8661cfcaacaddbc17ff646ef11d786d13f5427 Mon Sep 17 00:00:00 2001 From: maxizhang Date: Thu, 23 May 2024 19:47:13 +0800 Subject: [PATCH] fix: dlopen relative part problem in mac system --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index f20df80..5440a38 100644 --- a/src/index.js +++ b/src/index.js @@ -23,9 +23,9 @@ export default function loader(content) { return ` try { - process.dlopen(module, __dirname + require("path").sep + __webpack_public_path__ + ${JSON.stringify( + process.dlopen(module, require("path").join(__dirname, __webpack_public_path__, ${JSON.stringify( name - )}${ + )})${ typeof options.flags !== "undefined" ? `, ${JSON.stringify(options.flags)}` : ""