Skip to content

Commit

Permalink
fix: Use baseUrl to determine file paths (#1313)
Browse files Browse the repository at this point in the history
* Fix #1294
* Update DynamicModulePlugin.ts
* Update SourcePlugin.ts
  • Loading branch information
TheBrokenRail committed Jun 29, 2020
1 parent e553af2 commit c7eabf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/converter/plugins/DynamicModulePlugin.ts
Expand Up @@ -42,6 +42,9 @@ export class DynamicModulePlugin extends ConverterComponent {
private onBegin(context: Context) {
this.basePath.reset();
this.reflections = [];
if (context.getCompilerOptions().baseUrl) {
this.basePath.add(context.getCompilerOptions().baseUrl as string + '/file');
}
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/lib/converter/plugins/SourcePlugin.ts
Expand Up @@ -78,6 +78,9 @@ export class SourcePlugin extends ConverterComponent {
}
const fileName = node.fileName;
this.basePath.add(fileName);
if (context.getCompilerOptions().baseUrl) {
this.basePath.add(context.getCompilerOptions().baseUrl as string + '/file');
}
this.getSourceFile(fileName, context.project);
}

Expand Down

0 comments on commit c7eabf7

Please sign in to comment.