fix(core): fix wrong path on windows deploy (#15000)
This commit is contained in:
parent
97fdc24e84
commit
b9ff661337
|
|
@ -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('/'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue