Skip to content
Discussion options

You must be logged in to vote

You certainly can write your source code in TS, and use tsc to emit JS and use it directly.

You should keep the bare module specifiers like lit as they are for your published package so users can supply their own copy from npm and use their own bundler for resolving/bundling them.

For your own consumption and testing of your component, you can also use importmaps to resolve those bare module specifiers in the browser without doing a search and replace.
example https://stackblitz.com/edit/lit-importmap?file=index.html

Depending on other packages you use like directives and such, you may need to add more entries to the importmap. There might be tools that help you emit that importmap json t…

Replies: 2 comments 3 replies

Comment options

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

Answer selected by BOLL7708
@BOLL7708
Comment options

@tbroyer
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants