Skip to content

Commit

Permalink
Merge pull request #38 from ameenaburayya/patch-1
Browse files Browse the repository at this point in the history
fix: alias replace in internal imported declares
  • Loading branch information
steven-pribilinskiy committed Jan 19, 2024
2 parents 4963cc4 + 10db038 commit 997dd66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/downloadTypes/helpers/downloadRemoteEntryTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`,
);
}

Expand Down

0 comments on commit 997dd66

Please sign in to comment.