-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(init-templates): add typesRoot compiler option for typescript templates in the tsconfig.json #3865
feat(init-templates): add typesRoot compiler option for typescript templates in the tsconfig.json #3865
Conversation
Pull Request Checklist
|
d5f4f65
to
56c9db4
Compare
packages/aws-cdk/lib/init-templates/sample-app/javascript/tsconfig.json
Outdated
Show resolved
Hide resolved
56ce36d
to
29c75cb
Compare
@RomainMuller can you chime in? What do you think? |
That sounds fair - the only question is can this have unintended consequences? |
To be honest, I can’t really say if this will have additional side effects. But depending how you look at it, without having this setting, the side effects are already happening. It’s a valid concern though... |
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.
Let's give it a shot.
Thank you for contributing! Your pull request is now being automatically merged. |
Closes #3830
Given a project structure where the cdk (init) generated
node_modules
has a parent node project with its ownnode_modules
folder with failing typescript code, the CDK will not compile becausetsc
traverses the directory structure looking for type definitions.This small change adds the
typesRoot
compiler option essentially rooting the typescript compiler to look for types under thecdk_root_folder/node_modules/@types
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license