Skip to content

What tsconfig settings does lit recommend? #3923

Answered by augustjk
cadamsdev asked this question in Q&A
Discussion options

You must be logged in to vote

To add to this:

We are making a small update to the doc site for v3 as we do plan on bumping our target to es2021. https://lit.dev/docs/v3/tools/publishing/#compiling-with-typescript

"module" doesn't matter much beyond es2015 unless you're doing dynamic imports, use import.meta or do top level awaits. https://www.typescriptlang.org/tsconfig#es2015es6es2020es2022

"DOM.Iterable" is needed if you need DOM lists like NodeList to be iterable, like to for...of or spread, etc. We do need it in our library code as we do take advantage of that, but I want to say if you don't need it yourself, it might be okay to drop it.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@augustjk
Comment options

Answer selected by cadamsdev
@justinfagnani
Comment options

@cadamsdev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants