mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Fix path mapping call on web (#221859)
Fixes #221299 Seems like a TS bug that realpath is called here. This is a workaround for that
This commit is contained in:
@@ -338,6 +338,11 @@ function createServerHost(
|
||||
// For module resolution only. `node_modules` is also automatically mapped
|
||||
// as if all node_modules-like paths are symlinked.
|
||||
function realpath(path: string): string {
|
||||
if (path.startsWith('/^/')) {
|
||||
// In memory file. No mapping needed
|
||||
return path;
|
||||
}
|
||||
|
||||
const isNm = looksLikeNodeModules(path) && !path.startsWith('/vscode-global-typings/');
|
||||
// skip paths without .. or ./ or /. And things that look like node_modules
|
||||
if (!isNm && !path.match(/\.\.|\/\.|\.\//)) {
|
||||
|
||||
Reference in New Issue
Block a user