Skip to content

Publish standalone and ready-to-use web component #2670

Answered by kevinpschaaf
softdays asked this question in Q&A
Discussion options

You must be logged in to vote

Our guidance on publishing components is geared towards publishing modern component source on npm, as this is the best way to leave flexibility to the user of your component regarding what browsers to support, avoid duplication of dependencies, etc., since any choice about downleveling/polyfilling/bundling is left to the user when they build their app.

To publish a standalone component for use directly in the browser, you run headlong into all of these questions-- and it's hard to give one-size-fits-all guidance: What browsers should it support? What polyfills should it assume? What if the user needs more than one component that uses Lit, is it ok to duplicate Lit for each component?

We d…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@softdays
Comment options

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