-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Conversation
src/instances.ts
Outdated
@@ -507,7 +507,11 @@ function getOutputFileNames( | |||
} | |||
if ( | |||
(configFile.options.declaration || configFile.options.composite) && | |||
(instance.compiler as any).hasTSFileExtension(inputFileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to add this part to getEmitOutput
to return [] early even before getting program rather than here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thank you
src/instances.ts
Outdated
@@ -567,6 +567,9 @@ export function isReferencedFile(instance: TSInstance, filePath: string) { | |||
} | |||
|
|||
export function getEmitOutput(instance: TSInstance, filePath: string) { | |||
if (fileExtensionIs(filePath, typescript.Extension.Dts)) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
This looks great! |
Build is only failing because #1016 isn't merged yet - merging this; will merge the other subsequently |
it seems that ts-loader is trying to emit declaration files for a declaration file, this causes typescript's getOutputDeclarationFileName throw an error