-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
declarationDir
compiler option fails generation
#147
Comments
That's because the tool firstly compiles all sources to declaration files (in-memory) and then create a program for declaration files - this is how the tool works actually. Also, what version of the tool you use? It seems that the issue is related to "outDir" folder (I noticed that source code is in Is it possible to create a repro for that please? With tsconfig and all needed sources (I don't need all of them, just for a minimal repro). I think it might help much to solve the issue. |
Thank you for the reply. Indeed, I use composite project, but it should not affect the matter, because bundle generator is executed within the package itself. It works if I generate type definitions upfront with However, it does not work if |
The reason is |
declarationDir
compiler option fails generation
The fix is just published with 5.7.0 version. |
It works. Thank you for fixing. |
I am trying to bundle type definitions, but get the following
error TS6053: File 'src/index.d.ts' not found.
I run
yarn dts-bundle-generator --external-imports=react --out-file lib/index.d.ts src/index.ts
and it fails with this error.My
src/index.ts
is just a simple import of reusable React components:src/Text/index.ts
content issrc/Text/Body.tsx
content is similar in both files:Why does it need
src/index.d.ts
at all?I works fine if I run
tsc
to generate definition file for each ts/tsx file and use dts-bundle-generator later withyarn dts-bundle-generator --external-imports=react --out-file lib/index.d.ts lib/src/index.d.ts
The text was updated successfully, but these errors were encountered: