Skip to content

Commit

Permalink
fix: merge PR slidevjs#1555
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Apr 30, 2024
1 parent d13b884 commit 8dfb1ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/slidev/node/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { ensurePrefix, slash } from '@antfu/utils'
import { resolveGlobal } from 'resolve-global'
import { findDepPkgJsonPath } from 'vitefu'
import { findClosestPkgJsonPath, findDepPkgJsonPath } from 'vitefu'
import { resolvePath } from 'mlly'
import globalDirs from 'global-directory'
import prompts from 'prompts'
Expand Down Expand Up @@ -233,8 +233,9 @@ export async function getRoots(entry?: string): Promise<RootsInfo> {
= !/^(\.\.\/)*node_modules\//i.test(slash(relative(userRoot, cliRoot)))
|| (await import('is-installed-globally')).default
const clientRoot = await findPkgRoot('@slidev/client', cliRoot, true)
const userPkgJson = getUserPkgJson(userRoot)
const userWorkspaceRoot = searchForWorkspaceRoot(userRoot)
const closestPkgRoot = dirname(await findClosestPkgJsonPath(userRoot) || userRoot)
const userPkgJson = getUserPkgJson(closestPkgRoot)
const userWorkspaceRoot = searchForWorkspaceRoot(closestPkgRoot)
rootsInfo = {
cliRoot,
clientRoot,
Expand Down

0 comments on commit 8dfb1ee

Please sign in to comment.