Skip to content

Commit 722db5c

Browse files
authored
Merge pull request #12039 from remix-run/markdalgleish/fix-ts-plugin-vite-node-resolution
Typesafety: Fix vite-node resolution in TS plugin
2 parents 3bba333 + 72a20c3 commit 722db5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-router-dev/typescript/typegen.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ export async function watch(ctx: Context) {
3434
const appDirectory = Path.normalize(ctx.appDirectory);
3535
const routesTsPath = Path.join(appDirectory, "routes.ts");
3636

37-
const routesViteNodeContext = await ViteNode.createContext();
37+
const routesViteNodeContext = await ViteNode.createContext({
38+
root: ctx.rootDirectory,
39+
});
3840
async function getRoutes(): Promise<RouteManifest> {
3941
routesViteNodeContext.devServer.moduleGraph.invalidateAll();
4042
routesViteNodeContext.runner.moduleCache.clear();

0 commit comments

Comments
 (0)