From b9ff6613375c151644f491e9824cc03e1597f104 Mon Sep 17 00:00:00 2001 From: JimenezLi <75196426+JimenezLi@users.noreply.github.com> Date: Fri, 29 Mar 2024 02:58:56 +0800 Subject: [PATCH] fix(core): fix wrong path on windows deploy (#15000) --- lib/registry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/registry.ts b/lib/registry.ts index 74101502d..7d20172e2 100644 --- a/lib/registry.ts +++ b/lib/registry.ts @@ -45,7 +45,7 @@ if (Object.keys(modules).length) { | { namespace: Namespace; }; - const namespace = module.split('/')[1]; + const namespace = module.split(/[/\\]/)[1]; if ('namespace' in content) { namespaces[namespace] = Object.assign( { @@ -65,13 +65,13 @@ if (Object.keys(modules).length) { for (const path of content.route.path) { namespaces[namespace].routes[path] = { ...content.route, - location: module.split('/').slice(2).join('/'), + location: module.split(/[/\\]/).slice(2).join('/'), }; } } else { namespaces[namespace].routes[content.route.path] = { ...content.route, - location: module.split('/').slice(2).join('/'), + location: module.split(/[/\\]/).slice(2).join('/'), }; } }