re: Why I don't use web components VIEW POST

FULL DISCUSSION
 

Is it possible to inject Svelte components into an existing app without compiling them as web components?

 

Yep, by default they compile to regular JavaScript classes

 

Ah ok, we have been looking into using Stencil for some shared components. I assumed you could do this with Svelte but I couldn't find any examples.

But even though Rich built in a way to compile for web components in Svelte, which at least admits the need to address them, he tells you it's not recommended.

It's just a nice to have thing. Svelte is a compiler, so it can just change a target of compilation to WC. But not really many people in the community really use this opportunity.

 

Please check this example of integration existing Svelte component (Twitter Card widget) to React application created with CRA: github.com/PaulMaly/react-svelte

Example a little bit outdated, but the main idea doesn't change.

code of conduct - report abuse