Skip to content

Commit

Permalink
fix(ui5-middleware-ui5): ensure using forward slashes for mount path (#…
Browse files Browse the repository at this point in the history
…956)

Fixes #955
  • Loading branch information
petermuessig authored Feb 21, 2024
1 parent b5792df commit 92f1362
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui5-middleware-ui5/lib/ui5.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ module.exports = async ({ log, options, middlewareUtil }) => {
const { moduleId, mountPath, modulePath } = ui5Module;
const options = config?.modules?.[moduleId];

const absMountPath = path.join(mwMountPath, mountPath);
// append the middleware moutpath to the mount path of the module and ensure it is using forward slashes
const absMountPath = path.join(mwMountPath, mountPath).replace(/\\/g, "/");

// mounting the Router for the UI5 application to the CDS server
log.info(`Mounting ${absMountPath} to UI5 app ${modulePath} (id=${moduleId})${options ? ` using options=${JSON.stringify(options)}` : ""}`);
Expand Down

0 comments on commit 92f1362

Please sign in to comment.