From e2922837b1db88877bdfec9bc61713e2d2183882 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 20 May 2021 17:04:32 +0100 Subject: [PATCH] fix module resolution when path has a `#` (fixes #331) --- src/util/resolveFrom.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/resolveFrom.ts b/src/util/resolveFrom.ts index af6aeb0..fa6ef20 100644 --- a/src/util/resolveFrom.ts +++ b/src/util/resolveFrom.ts @@ -22,5 +22,6 @@ export function setPnpApi(pnpApi: any): void { export default function resolveFrom(from?: string, id?: string): string { let result = resolver.resolveSync({}, from, id) if (result === false) throw Error() - return result + // https://github.com/webpack/enhanced-resolve/issues/282 + return result.replace(/\0#/g, '#') }