Fix resolution of WSL files on Windows (#411)

master
Brad Cornes 2021-10-08 16:48:44 +01:00
parent d32e9cc086
commit 80e2e5aba5
2 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,6 @@ async function createProjectService(
concurrency: Math.max(os.cpus().length, 1), concurrency: Math.max(os.cpus().length, 1),
}) })
) )
.map(normalizePath)
.sort((a: string, b: string) => a.split('/').length - b.split('/').length) .sort((a: string, b: string) => a.split('/').length - b.split('/').length)
.map(path.normalize) .map(path.normalize)

View File

@ -18,6 +18,7 @@ export function setPnpApi(pnpApi: any): void {
} }
export default function resolveFrom(from?: string, id?: string): string { export default function resolveFrom(from?: string, id?: string): string {
if (id.startsWith('\\\\')) return id
let result = resolver.resolveSync({}, from, id) let result = resolver.resolveSync({}, from, id)
if (result === false) throw Error() if (result === false) throw Error()
// https://github.com/webpack/enhanced-resolve/issues/282 // https://github.com/webpack/enhanced-resolve/issues/282