diff --git a/packages/fes-preset-built-in/src/plugins/misc/route/index.js b/packages/fes-preset-built-in/src/plugins/misc/route/index.js index c0a2dd50..1d572c6b 100644 --- a/packages/fes-preset-built-in/src/plugins/misc/route/index.js +++ b/packages/fes-preset-built-in/src/plugins/misc/route/index.js @@ -293,7 +293,7 @@ export default function (api) { api.addCoreExports(() => [ { - specifiers: ['getRoutes'], + specifiers: ['getRoutes', 'getRouter'], source: absCoreFilePath } ]); diff --git a/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl b/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl index 651ff137..9cc786c0 100644 --- a/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl +++ b/packages/fes-preset-built-in/src/plugins/misc/route/template/routes.tpl @@ -33,3 +33,7 @@ export const createRouter = () => { return router; }; + +export const getRouter = ()=>{ + return router; +} \ No newline at end of file