From 7e58ff1b76935e991daac14b87da9d2464f02bb3 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 30 Sep 2025 16:52:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(window=E8=BF=90=E8=A1=8C):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0unconfig=E8=A6=86=E7=9B=96=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3windows=20=E4=B8=8B=E9=AB=98=E7=89=88?= =?UTF-8?q?=E6=9C=ACnodejs=E8=BF=90=E8=A1=8C=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 13 +++++++++++-- scripts/window-path-loader.js | 29 ----------------------------- 2 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 scripts/window-path-loader.js diff --git a/package.json b/package.json index 1a513e9..e445a31 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dev:app-android": "uni -p app-android", "dev:app-ios": "uni -p app-ios", "dev:custom": "uni -p", - "dev": "node --experimental-loader ./scripts/window-path-loader.js node_modules/@dcloudio/vite-plugin-uni/bin/uni.js", + "dev": "uni", "dev:test": "uni --mode test", "dev:prod": "uni --mode production", "dev:h5": "uni", @@ -172,8 +172,17 @@ "vite-plugin-restart": "^1.0.0", "vue-tsc": "^3.0.6" }, + "pnpm": { + "overrides": { + "unconfig": "7.3.2" + } + }, + "overrides": { + "unconfig": "7.3.2" + }, "resolutions": { - "bin-wrapper": "npm:bin-wrapper-china" + "bin-wrapper": "npm:bin-wrapper-china", + "unconfig": "7.3.2" }, "lint-staged": { "*": "eslint --fix" diff --git a/scripts/window-path-loader.js b/scripts/window-path-loader.js deleted file mode 100644 index 21f41b8..0000000 --- a/scripts/window-path-loader.js +++ /dev/null @@ -1,29 +0,0 @@ -// fix: https://github.com/unibest-tech/unibest/issues/219 - -// Windows path loader for Node.js ESM -// This loader converts Windows absolute paths to file:// URLs - -import { pathToFileURL } from 'node:url' - -/** - * Resolve hook for ESM loader - * Converts Windows absolute paths to file:// URLs - */ -export function resolve(specifier, context, defaultResolve) { - // Check if this is a Windows absolute path (starts with drive letter like C:) - if (specifier.match(/^[a-z]:\\/i) || specifier.match(/^[a-z]:\//i)) { - // Convert Windows path to file:// URL - const fileUrl = pathToFileURL(specifier).href - return defaultResolve(fileUrl, context, defaultResolve) - } - - // For all other specifiers, use the default resolve - return defaultResolve(specifier, context, defaultResolve) -} - -/** - * Load hook for ESM loader - */ -export function load(url, context, defaultLoad) { - return defaultLoad(url, context, defaultLoad) -}