-
Notifications
You must be signed in to change notification settings - Fork 293
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: correct declaration output dir #627
Conversation
Just to clarify the expected behaviour here - do you need these types to be included in the output? If so, the fix looks like the right sort of approach to me, but I would make two suggestions to get this merged:
|
Additionally, we'll need a test for this new behavior |
update upstream branch
I think this may not be a common use case, I use this is because I need to compile code into multiple types of modules(es, commonjs), and they shared the tsconfig. to avoid duplicate generate declarations, it needs to compile declarations into a separate folder. so I make this changes, but it seems not necessary if use
I move logic into |
test added |
Thanks for the test refinements here. I'm still not super comfortable with assuming that the type folder and |
Enable minification for sourcemap-register.js (vercel#631)
Yes, it should read Thanks for the detailed review. You can check it again to see if the appropriate changes have been made. |
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.
This looks great to me now, thanks for working on a comprehensive approach 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.
Thanks!
This reverts commit d175973.
If declarationDir is special, the output dir will be unexpected, fixes #481, and I run typescript example will cause same error as follow
tsconfig.json
as followI give a quick fix, rewrite dir before write file into disk, seems can fix the problem.