feat: 破坏性更新 cjs to es

This commit is contained in:
手瓜一十雪 committed 2024-05-22 19:58:45 +08:00
1 parent 08976624cd
commit 4e0cdbcb91
17 files changed
+75 -13

No files matched your search

+5
View File
@@ -1,7 +1,12 @@
import * as os from 'os';
import path from 'node:path';
import fs from 'fs';
import { dirname } from "node:path"
import { fileURLToPath } from "node:url"
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export function getModuleWithArchName(moduleName: string) {
const systemPlatform = os.platform();
const cpuArch = os.arch();