From df694ea391cea425aaba13fe9103bf08a86ea4fb Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 29 Mar 2022 22:21:48 +0200 Subject: [PATCH] fix: add default route when generating code --- src/rollup/plugins/handlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rollup/plugins/handlers.ts b/src/rollup/plugins/handlers.ts index f245fce6d2..58d8810ea6 100644 --- a/src/rollup/plugins/handlers.ts +++ b/src/rollup/plugins/handlers.ts @@ -40,7 +40,7 @@ ${imports.map(handler => `import ${getImportId(handler)} from '${handler}';`).jo ${lazyImports.map(handler => `const ${getImportId(handler)} = () => import('${handler}');`).join('\n')} const handlers = [ -${handler.map(m => ` { route: '${m.route}', handler: ${getImportId(m.handler)}, lazy: ${m.lazy || true} }`).join(',\n')} +${handler.map(m => ` { route: '${m.route || '/'}', handler: ${getImportId(m.handler)}, lazy: ${m.lazy || true} }`).join(',\n')} ]; export default handlers