Check check out the functions in vscode-uri For web-extension: The vscode-uri node module provides joinPath, dirName, baseName, extName, resolvePath. Replace all path imports with this