←back to thread

277 points merqurio | 1 comments | | HN request time: 0.001s | source
Show context
mulhoon ◴[] No.45114082[source]
Working with a large Vue 3 project and wanting to share some of our components as re-usable web components for other sites to embed...

What would be the benefit of rebuilding these components in Lit over using Vue to build them?

https://vuejs.org/guide/extras/web-components#building-custo...

replies(3): >>45114258 #>>45114510 #>>45118426 #
1. Muromec ◴[] No.45118426[source]
>Working with a large Vue 3 project and wanting to share some of our components as re-usable web components for other sites to embed...

Make a fat bundle with a web component or even a mount() function exported and run whatever fits your devx inside, with the API surface as narrow as possible. As long as it's self contained and the size is reasonable, nobody on a consumer side cares how you cook, so optimize your own pipelines to build, test and publish it.

People will build adapters to fit it into their stuff anyway and will let you know.