We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8a2a5f commit fa801bfCopy full SHA for fa801bf
src/index.ts
@@ -97,16 +97,16 @@ export const pluginReactRouter = (
97
return {} as Config;
98
});
99
100
- const routesPath = resolve(appDirectory, 'routes.ts');
+ const routesPath = findEntryFile(resolve(appDirectory, 'routes'));
101
102
// Then read the routes
103
const routeConfig = await jiti
104
.import<RouteConfigEntry[]>(routesPath, {
105
default: true,
106
})
107
.catch(error => {
108
- console.error('Failed to load routes.ts:', error);
109
- console.error('No routes.ts found in app directory.');
+ console.error('Failed to load routes file:', error);
+ console.error('No routes file found in app directory.');
110
return [] as RouteConfigEntry[];
111
112
0 commit comments