Skip to content

Commit 3bfb897

Browse files
fix: add proper TypeScript types for routeDiscovery configuration
1 parent 1a92864 commit 3bfb897

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export const pluginReactRouter = (
8686
basename = '/',
8787
buildDirectory = 'build',
8888
ssr = true,
89-
routeDiscovery = { mode: 'lazy', manifestPath: '/__manifest' },
9089
} = await jiti
9190
.import<Config>('./react-router.config.ts', {
9291
default: true,
@@ -98,6 +97,9 @@ export const pluginReactRouter = (
9897
return {} as Config;
9998
});
10099

100+
// Set default routeDiscovery configuration
101+
const routeDiscovery = { mode: 'lazy', manifestPath: '/__manifest' } as const;
102+
101103
const routesPath = findEntryFile(resolve(appDirectory, 'routes'));
102104

103105
// Then read the routes

0 commit comments

Comments
 (0)