@materiel/web ESM 存在问题,似乎正在加载两次文件。 [esm-raw]
作者: treeder创建于 2023年4月5日更新于 2026年6月27日
描述错误
如果我这样导入两个文件:
<html>
<body>
<script type="module">
import 'https://cdn.jsdelivr.net/npm/@material/[email protected]/navigationtab/navigation-tab.js/+esm'
import 'https://cdn.jsdelivr.net/npm/@material/[email protected]/button/filled-button.js/+esm'
</script>
<h1>Hi</h1>
</body>
</html>我会收到以下错误:
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "md-focus-ring" 已经在该注册表中使用过内容来源: jsdelivr/jsdelivr