[英]Is it possible to combine web components built with different versions of stencil on the same page?
Stencil JS generates native web components. Stencil JS 生成原生 Web 组件。 I'm wondering if it's possible to combine web components build from different versions of Stencil JS on the same page.
我想知道是否可以在同一页面上组合从不同版本的 Stencil JS 构建的 Web 组件。
Their FAQ implicitly claims this to be possible:他们的常见问题解答含蓄地声称这是可能的:
What dependencies does the Stencil runtime have?
Stencil 运行时有哪些依赖项? 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.
Stencil 生成的代码不依赖于 Stencil,而是生成高度优化的、无框架的、独立的代码,在浏览器中本地运行。
https://stenciljs.com/docs/faq#what-dependencies-does-the-stencil-runtime-have https://stenciljs.com/docs/faq#what-dependencies-does-the-stencil-runtime-have
Can anybody verify this claim?有人可以验证这个说法吗?
是的,应该没有理由不,StencilJS 是一个编译器,所以生成的 javascript 文件是纯 javascript webcomponents,包中没有“模板”,所以它只是加载 vanilla javascript 文件
Yes it works.是的,它有效。 The final code is JavaScript which you will be using in the html page.
最终代码是您将在 html 页面中使用的 JavaScript。 There is nothing related to stencil specific there.
那里没有任何与模板相关的内容。 StencilJs is not a framework!.
StencilJs 不是一个框架!。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.