Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1294 #1313

Merged
merged 3 commits into from Jun 29, 2020
Merged

Fix #1294 #1313

merged 3 commits into from Jun 29, 2020

Conversation

TheBrokenRail
Copy link
Contributor

Fixes #1294

@@ -61,6 +61,9 @@ export class DynamicModulePlugin extends ConverterComponent {
name = name.replace(/"/g, '');
this.reflections.push(reflection);
this.basePath.add(name);
if (context.getCompilerOptions().baseUrl) {
this.basePath.add(context.getCompilerOptions().baseUrl as string + '/file');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because BasePath expects a file and then get the dirname, turning a/b/c into a/b this counteracts that.

@TheBrokenRail
Copy link
Contributor Author

Any updates?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 28, 2020

Can we add the baseUrl in onBegin instead of onDeclaration? The efficiency gain should be minor, but I'd rather not be slow when it's easy to use a faster option.

@TheBrokenRail
Copy link
Contributor Author

Done!

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 29, 2020

Can we do that for the SourcePlugin as well?

@TheBrokenRail
Copy link
Contributor Author

SourcePlugin already has it in onBeginDocument, but it can't be in onBegin because onBegin is not passed an instance of Context.

@Gerrit0 Gerrit0 merged commit c7eabf7 into TypeStrong:master Jun 29, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 29, 2020

Makes sense, thanks! Putting together a release now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

baseUrl does not affect module names
2 participants