fix(create-vite): update template-lit-ts tsconfig (fix #12854)#12855
fix(create-vite): update template-lit-ts tsconfig (fix #12854)#12855patak-cat merged 1 commit intovitejs:mainfrom
Conversation
|
|
|
Is this still valid with TS 5? Same for |
|
Hi, I think this options must be keep since esbuild is not a full spec typescript compiler. By other hand, Lit docs really recommend this options to be setted. Why? Currently, lit uses old decorators style since it uses typescript 4.7. |
bluwy
left a comment
There was a problem hiding this comment.
I'm fine with this if it's what the lit docs recommend.
|
I personally feels bad to ship empty templates with legacy/deprecated options turn on. If decorators are not a required part of the framework, I would advice people to not start using this legacy runtime behaviour that will never be shipped to engines. Is this legacy requirement tracked as an issue on the framework side? |
|
Lit does plan to implement the new decorators eventually but we require decorator metadata to be implemented microsoft/TypeScript#53461 for feature parity with our existing decorators. While technically decorators are not a required part of the framework, most Lit projects using TS will be using decorators as they are prevalent in the official docs and examples as well. I do understand the hesitation of including legacy/deprecated settings for templates. However, per the TS 5.0 blog
I believe it's valid to include this flag for projects that have relied on this feature for so long. And these flag requirements are documented in the Lit docs as mentioned above. As it is, https://vite.new/lit-ts leads to a non-functioning project. |
There was a problem hiding this comment.
Thanks for the update and the pointer.
For more context on my initial pushback, I think we have a great chance in the ecosystem to have access to fast transpiler like esbuild and I think we should try to stay away from TS features that are more than syntax transformation to be able to use these new transpilers.
Description
Fixes #12854
Updates tsconfig settings to be compatible with Lit projects.
Context for settings: https://lit.dev/docs/components/decorators/#decorators-typescript
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).