From 10db0380923c81cf9ad94614601f47b0147bb2f4 Mon Sep 17 00:00:00 2001 From: ameenaburayya <72743038+ameenaburayya@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:33:07 +0200 Subject: [PATCH] fix: alias replace in internal imported declares --- src/downloadTypes/helpers/downloadRemoteEntryTypes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/downloadTypes/helpers/downloadRemoteEntryTypes.ts b/src/downloadTypes/helpers/downloadRemoteEntryTypes.ts index 3d6f4cc..32d4209 100644 --- a/src/downloadTypes/helpers/downloadRemoteEntryTypes.ts +++ b/src/downloadTypes/helpers/downloadRemoteEntryTypes.ts @@ -28,8 +28,8 @@ export async function downloadRemoteEntryTypes( // with a name (an alias) that is used in `remotes` object. Usually these are same. if (remoteName !== remoteOriginalName) { types = types.replace( - new RegExp(`declare module "${remoteOriginalName}(.*)"`, 'g'), - (_, $1) => `declare module "${remoteName}${$1}"`, + new RegExp(`"${remoteOriginalName}(.*)"`, 'g'), + (_, $1) => `"${remoteName}${$1}"`, ); }