Skip to content

Commit

Permalink
refactor: Drop restrictive module path check in TsModule.getContentFi…
Browse files Browse the repository at this point in the history
…lePathForModulePath
  • Loading branch information
nonara committed Dec 4, 2024
1 parent 3f6892f commit 32cf55f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion projects/core/src/module/ts-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export namespace TsModule {
/* Determine shim redirect file - see: https://github.com/nonara/ts-patch/issues/174 */
export function getContentFilePathForModulePath(modulePath: string): string {
const baseName = path.basename(modulePath);
if (!names.includes(baseName as any)) throw new TspError(`Invalid module path: ${modulePath}`);

const redirectFile = contentFileMap[baseName];
const maybeModuleContentPath = redirectFile && path.join(path.dirname(modulePath), redirectFile);
Expand Down

0 comments on commit 32cf55f

Please sign in to comment.