diff --git a/lib/processors/bundlers/manifestBundler.js b/lib/processors/bundlers/manifestBundler.js index a82164d37..d5ea4251c 100644 --- a/lib/processors/bundlers/manifestBundler.js +++ b/lib/processors/bundlers/manifestBundler.js @@ -1,4 +1,4 @@ -const path = require("path"); +const posixPath = require("path").posix; const yazl = require("yazl"); const resourceFactory = require("@ui5/fs").resourceFactory; const log = require("@ui5/logger").getLogger("builder:processors:bundlers:manifestBundler"); @@ -23,7 +23,7 @@ class I18nResourceList { * @param {module:@ui5/fs.Resource} resource i18n resource */ add(directory, resource) { - const normalizedDirectory = path.normalize(directory); + const normalizedDirectory = posixPath.normalize(directory); if (!this.propertyFiles.has(normalizedDirectory)) { this.propertyFiles.set(normalizedDirectory, [resource]); } else { @@ -38,7 +38,7 @@ class I18nResourceList { * @returns {Array} Array of resources files */ get(directory) { - return this.propertyFiles.get(path.normalize(directory)) || []; + return this.propertyFiles.get(posixPath.normalize(directory)) || []; } } @@ -72,8 +72,8 @@ module.exports = ({resources, options: {namespace, bundleName, propertiesExtensi return; } descriptorI18nInfos.set( - path.join(path.dirname(manifest.path), path.dirname(i18nPath)), - path.basename(i18nPath, propertiesExtension) + posixPath.join(posixPath.dirname(manifest.path), posixPath.dirname(i18nPath)), + posixPath.basename(i18nPath, propertiesExtension) ); } @@ -115,7 +115,7 @@ module.exports = ({resources, options: {namespace, bundleName, propertiesExtensi return Promise.all(resources.map((resource) => resource.getBuffer().then((content) => { - const basename = path.basename(resource.getPath()); + const basename = posixPath.basename(resource.getPath()); return { name: basename, isManifest: basename === descriptor, @@ -133,7 +133,7 @@ module.exports = ({resources, options: {namespace, bundleName, propertiesExtensi addDescriptorI18nInfos(descriptorI18nInfos, resource); archiveContent.set(resource.path, resource.content); } else { - const directory = path.dirname(resource.path); + const directory = posixPath.dirname(resource.path); i18nResourceList.add(directory, resource); } });