We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1daeed5 commit f09f4e9Copy full SHA for f09f4e9
packages/vite/helpers/project.ts
@@ -1,5 +1,5 @@
1
import { existsSync } from 'fs';
2
-import { resolve, dirname } from 'path';
+import { resolve } from 'path';
3
import { createRequire } from 'node:module';
4
const require = createRequire(import.meta.url);
5
@@ -8,7 +8,7 @@ export function getProjectRootPath(): string {
8
}
9
10
// Get current directory for ES modules (equivalent to __dirname)
11
-export const __dirname = dirname(new URL(import.meta.url).pathname);
+export const __dirname = import.meta.dirname;
12
13
interface IPackageJson {
14
name?: string;
0 commit comments