Skip to content

Commit b10e6b1

Browse files
committed
fix(rsc): respect vite config root
1 parent 93acc26 commit b10e6b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/plugin-rsc/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export default function vitePluginRsc(
468468
// crawl packages with "react" in "peerDependencies" to bundle react deps on server
469469
// see https://github.com/svitejs/vitefu/blob/d8d82fa121e3b2215ba437107093c77bde51b63b/src/index.js#L95-L101
470470
const result = await crawlFrameworkPkgs({
471-
root: process.cwd(),
471+
root: config.root ?? process.cwd(),
472472
isBuild: env.command === 'build',
473473
isFrameworkPkgByJson(pkgJson) {
474474
if ([PKG_NAME, 'react-dom'].includes(pkgJson.name)) {

0 commit comments

Comments
 (0)