]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor: improve file path resolution (#55)
authorKaine <121680374+kaine0923@users.noreply.github.com>
Tue, 12 Dec 2023 07:33:31 +0000 (15:33 +0800)
committerGitHub <noreply@github.com>
Tue, 12 Dec 2023 07:33:31 +0000 (15:33 +0800)
playground/setup/dev.js

index 707358703a00b08bed98525df9b23484207827a2..79f4f42caf6f1527fe4a888092e3c1b696fcfb5c 100644 (file)
@@ -1,7 +1,8 @@
 // @ts-check
 import path from 'node:path'
+import { fileURLToPath } from 'node:url'
 
-const dirname = path.dirname(new URL(import.meta.url).pathname)
+const dirname = path.dirname(fileURLToPath(new URL(import.meta.url)))
 const resolve = (/** @type {string} */ p) =>
   path.resolve(dirname, '../../packages', p)