From 948cf5cca69f9063318894deac0a816816d39420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 4 Jun 2024 12:26:19 +0800 Subject: [PATCH] refactror: cpmoudle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 此处非NC运行时的代码 用于打包时运行 --- src/common/utils/cpmodule.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/common/utils/cpmodule.ts b/src/common/utils/cpmodule.ts index 04c621b3..ec3c7362 100644 --- a/src/common/utils/cpmodule.ts +++ b/src/common/utils/cpmodule.ts @@ -3,8 +3,6 @@ import path from 'node:path'; import fs from 'fs'; import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { logError } from './log'; - const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); @@ -20,6 +18,6 @@ export function cpModule(moduleName: string) { try { fs.copyFileSync(path.join(currentDir, fileName), path.join(currentDir, `${moduleName}.node`)); } catch (e) { - logError(e); + console.error(e); } }