From ad52cad5a31f34172675f4c0c850e3d3ea8fd3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E7=BA=AF?= Date: Thu, 11 Mar 2021 16:18:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0getRouter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-preset-built-in/src/plugins/misc/route/index.js | 2 +- .../src/plugins/misc/route/template/routes.tpl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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