简体   繁体   English

是否可以在同一页面上组合使用不同版本的模板构建的 Web 组件?

[英]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.

相关问题 是否可以在同一页面上运行两个不同版本的ReactJS? - is it possible to run two different versions of ReactJS on the same page? 是否可以使用由不同版本的 Angular 构建的不同角度元素 - Is it possible to use different angular elements built with different versions of Angular 是否可以在同一页面上使用2个版本的jQuery? - Is it possible to use 2 versions of jQuery on the same page? 是否可以在同一页面上运行2个不同版本的ASP.NET Ajax库? - Is it possible to have 2 different versions of the ASP.NET Ajax Library running on the same page? 在同一个HTML页面中有两个不同版本的JQuery - Two different versions of JQuery in the same HTML page 如何使用 Tab 键在 Angular 的同一页面中的不同子组件之间导航? - How is it possible to use the tab key to navigate between different child components in the same page with Angular? 单击时切换所有相同类型的 stencil.js 组件 - Toggle all stencil.js components of the same kind when clicked 是否可以在一个页面上运行具有不同角度版本的多个应用程序? - Is it possible to run multiple apps with different angular versions on one page? 如何在同一页面上运行不同版本的jQuery? - How do I run different versions of jQuery on the same page? 同一页面中的不同jQuery源和版本(googleapi,代码) - Different jQuery sources & versions in same page (googleapi, Code)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM