async function resolvePathVariables(rawPath, bytePosition, jsParsed, importedFiles) {
    if (!rawPath) {
        return rawPath;
    }

    if (rawPath) {
        rawPath = rawPath.replaceAll(' ', '');
    }
    try {
        let pathVariables = await handleData.removeStrings(rawPath);
        if (rawPath && (rawPath.includes('${') || pathVariables.length > 0) && jsParsed && jsParsed.variables && jsParsed.variables.length > 0) {
            pathVariables = pathVariables.split('+').filter(e => e != '' && e != ' ');
            let auxPath = rawPath.replaceAll(' ', '').split(new RegExp('\\$\\{'));
            auxPath.shift();
            auxPath = [...auxPath, ...pathVariables];
            for (let index = 0; index < auxPath.length; ++index) {
                let e = auxPath[index];
                let varName = e.split(new RegExp('\\}|\\+\\"|\\+\'|\\+\\`'))[0];
                let varKey = varName.split('.')[0];
                let resolvedVariables = jsParsed.variables.filter(v => v.name == varKey && v.end <= bytePosition);
                let exportPath = null;
                if (!resolvedVariables || resolvedVariables.length == 0) {
                    // Variable in other file
                    let idx = importedFiles.findIndex(e => e.varFileName && varKey && e.varFileName == varKey);
                    if (idx == -1) {
                        // Second, tries to find in the 'exports' of import/require, such as 'foo' in the: import { foo } from './fooFile'
                        importedFiles.forEach(imp => {
                            if (exportPath) {
                                return;
                            }
                            let found = imp && imp.exports ? imp.exports.find(e => e.varName && varKey && e.varName == varKey) : null;
                            if (found) {
                                // TODO
                            }
                        });
                    } else {
                        let pathFile = importedFiles[idx].fileName;
                        let extension = await utils.getExtension(pathFile);
                        let fileContent = await utils.getFileContent(pathFile + extension);
                        const jsExternalParsed = jsParser(await handleData.removeComments(fileContent, true));
                        if (varName.includes('.')) {
                            varKey = varName.split('.')[1];
                        }

                        resolvedVariables = jsExternalParsed.variables.filter(v => v.name == varKey && v.end <= bytePosition);
                    }
                }

                if (resolvedVariables && resolvedVariables.length > 0) {
                    resolvedVariables.sort(function (a, b) {
                        return b.end - a.end;
                    }); // Get variable in the nearest scope
                    let value = null;
                    if (varName.split('.').length > 1 && resolvedVariables[0].typeof == 'object') {
                        value = searchInObject(resolvedVariables[0].value, varName.split('.').slice(1).join('.'));
                    } else {
                        value = resolvedVariables[0].value;
                    }

                    if (rawPath === varName) {
                        // Just the variable in the path
                        rawPath = value;
                    } else {
                        rawPath = rawPath.replaceAll('${' + varName + '}', value);
                        rawPath = rawPath.replaceAll('+' + varName, '+' + value);
                        rawPath = rawPath.replaceAll(varName + '+', value + '+');
                    }
                }
            }
        }
        if (rawPath) {
            rawPath = removeCharacter(rawPath, '+'); // Removingo '+' outside of strings. Avoinding problems such as: '/path_regex/:foo([a-z]+)'
            rawPath = rawPath.replaceAll("'", '').replaceAll('"', '').replaceAll('`', '');
        }

        return rawPath;
    } catch (err) {
        return rawPath;
    }
}
Resolve referenced varibles in the path.

@param {string} rawPath
@param {number} bytePosition
@param {*} jsParsed
@param {Array} importedFiles
@returns