admin管理员组文章数量:1399912
The current Lit element starter projects rollup builds publish the bundles in esm
format.
I'd like to switch out the rollup build with Vite, and the Vite Library builds output UMD format.
Can we switch out esm
format with UMD
format?
Is there anything that esm
does that we cannot do with UMD
?
For example with the current Lit builds we can use a component published to NPM like this via the UNPKG CDN.
<script
type="module"
src=";
></script>
Can we do the same thing with UMD?
Are there any differences as far as regular imports go. For example with esm
we can do import { ExampleComponent } from "example-component"
. Is it the same with UMD
?
版权声明:本文标题:javascript - Is the UMD format interchangeable with ESM for Web Components served over CDNs? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744125825a2591946.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论