mirror of https://github.com/vuejs/core.git
refactor: improve file path resolution (#55)
This commit is contained in:
parent
3ba1315e72
commit
48e8f2c196
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue