News for hackers. Stuff that matters.
Re:HTML Web Components by ttfkam on Tuesday November 14, 2023 @02:23AM (#38260122)
Apparently not widely know, but…

> Svelte components can also be compiled to custom elements (aka web components) using the customElement: true compiler option.

https://svelte.dev/docs/custom-elements-api

This would negate the "vendor lock-in" arguments and allow Svelte for component development but web component for consumption and use. Best of both worlds. All the DX advantages of Svelte over web components without sacrificing interoperability.

Re:HTML Web Components by nathansherburn on Tuesday November 14, 2023 @03:09AM (#38260417)
Any examples of the web component code they spit out?
Re:HTML Web Components by pabc1 on Tuesday November 14, 2023 @04:08AM (#38260844)
I believe some people generally avoid Svelte for custom elements since Rich (and other maintainers) have consistently shown criticism towards Web Components in general.