Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ export const pluginReactRouter = (
return {} as Config;
});

const routesPath = resolve(appDirectory, 'routes.ts');
const routesPath = findEntryFile(resolve(appDirectory, 'routes'));

// Then read the routes
const routeConfig = await jiti
.import<RouteConfigEntry[]>(routesPath, {
default: true,
})
.catch(error => {
console.error('Failed to load routes.ts:', error);
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.');
return [] as RouteConfigEntry[];
});

Expand Down