From bdc6f48d9be7bf1b3c77ba8682e7d4b488d835a5 Mon Sep 17 00:00:00 2001 From: bac-joker Date: Fri, 12 Mar 2021 11:33:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=BC=E5=87=BA=20router?= 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 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..7833065e 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', 'router'], 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..6cd01cbc 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 @@ -14,7 +14,7 @@ export function getRoutes() { } const ROUTER_BASE = '{{{ routerBase }}}'; -let router = null; +export let router = null; export const createRouter = () => { if (router) { return router;