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

fixes https://github.com/TypeStrong/ts-loader/issues/1014 #1015

Merged
merged 3 commits into from Sep 20, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/instances.ts
Expand Up @@ -567,6 +567,9 @@ export function isReferencedFile(instance: TSInstance, filePath: string) {
}

export function getEmitOutput(instance: TSInstance, filePath: string) {
if (fileExtensionIs(filePath, typescript.Extension.Dts)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry missed this earlier but for extension use instance.compiler.Extension.Dts typescript is used only for types for tsloader code.. The compiler = typescript of the compilation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks for your time

return [];
}
const program = ensureProgram(instance);
if (program !== undefined) {
const sourceFile = program.getSourceFile(filePath);
Expand Down