Search code examples
javascriptstenciljsnative-web-component

Is it possible to combine web components built with different versions of stencil on the same page?


Stencil JS generates native web components. I'm wondering if it's possible to combine web components build from different versions of Stencil JS on the same page.

Their FAQ implicitly claims this to be possible:

What dependencies does the Stencil runtime have? None. The code generated by Stencil does not rely on Stencil, but rather it generates highly-optimized, framework-free, stand-alone code which runs natively in the browser.

https://stenciljs.com/docs/faq#what-dependencies-does-the-stencil-runtime-have

Can anybody verify this claim?


Solution

  • Yes there should be no reason why not, StencilJS is a compiler so the javascript files generated are pure javascript webcomponents, there is no "stencil" in the bundle, so it would simply be loading vanilla javascript files