Skip to content

Commit

Permalink
Merge pull request #12039 from remix-run/markdalgleish/fix-ts-plugin-…
Browse files Browse the repository at this point in the history
…vite-node-resolution

Typesafety: Fix vite-node resolution in TS plugin
  • Loading branch information
pcattori authored Sep 26, 2024
2 parents 3bba333 + 72a20c3 commit 722db5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-router-dev/typescript/typegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export async function watch(ctx: Context) {
const appDirectory = Path.normalize(ctx.appDirectory);
const routesTsPath = Path.join(appDirectory, "routes.ts");

const routesViteNodeContext = await ViteNode.createContext();
const routesViteNodeContext = await ViteNode.createContext({
root: ctx.rootDirectory,
});
async function getRoutes(): Promise<RouteManifest> {
routesViteNodeContext.devServer.moduleGraph.invalidateAll();
routesViteNodeContext.runner.moduleCache.clear();
Expand Down

0 comments on commit 722db5c

Please sign in to comment.