mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 00:35:51 +00:00
fix: 修正 vite 构建的 Windows 路径解析
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
import { defineConfig, type Plugin } from "vite";
|
import { defineConfig, type Plugin } from "vite";
|
||||||
import { resolve, dirname } from "path";
|
import { resolve, dirname } from "path";
|
||||||
|
import { fileURLToPath } from "url";
|
||||||
import { readFileSync } from "fs";
|
import { readFileSync } from "fs";
|
||||||
import { getMacroDefines } from "./scripts/defines";
|
import { getMacroDefines } from "./scripts/defines";
|
||||||
import featureFlagsPlugin from "./scripts/vite-plugin-feature-flags";
|
import featureFlagsPlugin from "./scripts/vite-plugin-feature-flags";
|
||||||
import importMetaRequirePlugin from "./scripts/vite-plugin-import-meta-require";
|
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).
|
* Plugin to import .md files as raw strings (Bun's text loader behavior).
|
||||||
|
|||||||
Reference in New Issue
Block a user