From 5eaa0911537b06cf518eca890e3ab15290226e33 Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Thu, 15 Oct 2020 11:33:35 -0300 Subject: [PATCH] fix: Replace all backslashes when normalizing path in getFormattedDiagnostic --- packages/next/lib/typescript/diagnosticFormatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/lib/typescript/diagnosticFormatter.ts b/packages/next/lib/typescript/diagnosticFormatter.ts index 5870bf7f36f8a79..5d04d12a0ac5c5c 100644 --- a/packages/next/lib/typescript/diagnosticFormatter.ts +++ b/packages/next/lib/typescript/diagnosticFormatter.ts @@ -45,7 +45,7 @@ export async function getFormattedDiagnostic( const character = pos.character + 1 let fileName = path.posix.normalize( - path.relative(baseDir, diagnostic.file.fileName).replace(/\\/, '/') + path.relative(baseDir, diagnostic.file.fileName).replace(/\\/g, '/') ) if (!fileName.startsWith('.')) { fileName = './' + fileName