From 3d10db639cc6f7051788a5b3e58744aaf4d5cf19 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Fri, 19 Jul 2024 22:59:02 -0400 Subject: [PATCH] Update build.mts --- scripts/build/build.mts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/build/build.mts b/scripts/build/build.mts index a14b299b..f5e7696c 100644 --- a/scripts/build/build.mts +++ b/scripts/build/build.mts @@ -22,7 +22,6 @@ import { BuildOptions, Plugin } from "esbuild"; import { existsSync, readdirSync } from "fs"; import { readdir, rm, writeFile } from "fs/promises"; import { join } from "path"; -import { pathToFileURL } from "url"; import { addBuild, BUILD_TIMESTAMP, buildOrWatchAll, commonOpts, exists, globPlugins, IS_DEV, IS_REPORTER, IS_STANDALONE, IS_UPDATER_DISABLED, resolvePluginName, VERSION, watch } from "@scripts/build/common.mts"; @@ -71,13 +70,13 @@ const globNativesPlugin: Plugin = { let natives = "\n"; let i = 0; for (const dir of pluginDirs) { - const dirPath = pathToFileURL(join("src", dir)); + const dirPath = join("src", dir); if (!await exists(dirPath)) continue; const plugins = await readdir(dirPath, { withFileTypes: true }); for (const file of plugins) { const fileName = file.name; - const nativePath = pathToFileURL(join(dirPath, fileName, "native.ts")); - const indexNativePath = pathToFileURL(join(dirPath, fileName, "native/index.ts")); + const nativePath = join(dirPath, fileName, "native.ts"); + const indexNativePath = join(dirPath, fileName, "native/index.ts"); if (!(await exists(nativePath)) && !(await exists(indexNativePath))) continue;