From 7a9f53b63f0d885da918994c0796fea78ae1c3d6 Mon Sep 17 00:00:00 2001 From: 1111 <11111@asd.c> Date: Sun, 19 Apr 2026 18:50:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20vite=20=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=20Windows=20=E8=B7=AF=E5=BE=84=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index fec927ae5..5dd994f29 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,12 @@ import { defineConfig, type Plugin } from "vite"; import { resolve, dirname } from "path"; +import { fileURLToPath } from "url"; import { readFileSync } from "fs"; import { getMacroDefines } from "./scripts/defines"; import featureFlagsPlugin from "./scripts/vite-plugin-feature-flags"; import importMetaRequirePlugin from "./scripts/vite-plugin-import-meta-require"; -const projectRoot = dirname(new URL(import.meta.url).pathname); +const projectRoot = dirname(fileURLToPath(import.meta.url)); /** * Plugin to import .md files as raw strings (Bun's text loader behavior).