-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add template tsconfigs for users to extend from #4439
Conversation
🦋 Changeset detectedLatest commit: 2312699 The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hmm, this works perfectly fine in the editor, but for some reason Vite/ESBuild isn't able to resolve the extends and building fails. Not sure why |
"./tsconfigs/*.json": "./tsconfigs/*", | ||
"./tsconfigs/*": "./tsconfigs/*.json", |
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.
We need those two because in a tsconfig.json
, you can optionally omit the file extension
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.
Are we ready for tsconfig changes to become breaking changes? This will really limit changes to these files going forward, so I just want to call that out. If we think this is stable enough to not really change until v2.0, then I'm on board!
That's good to me! I honestly don't expect much breaking changes to them in our future. The big one that could come to mind would be switching to |
SGTM! |
Changes
This adds tsconfig templates that users can extend from and update our templates and create-astro to use them. The benefits of having those templates is that it's neater, convenient for users to build from and that we can update them between versions of Astro without needing any users interaction (ex: adding new TypeScript settings, setting up aliases etc)
This also severely reduce the maintenance cost of our templates since we don't have to update all the tsconfig.json manually anymore
Fix #4297 at the same time
Testing
Tested manually
Docs
N/A