Specify external dependencies of dependencies
It would be nice if the deps parameter would also work for dependencies of dependencies.
For example I want to specify a version of @tiptap/core. Within @tiptap/starter-kit some other packages are loaded, e.g. @tiptap/extension-blockquote. @tiptap/extension-blockquote also depends on @tiptap/core but esm.sh loads a different version of it (2.0.0-beta.99). Setting deps on @tiptap/starter-kit doesn’t help unfortunately.
Can be tested with this html file.
<!doctype html>
<head>
<meta charset="utf-8">
</head>
<body>
<div class="element"></div>
<script type="module">
import { Editor } from 'https://esm.sh/@tiptap/[email protected]'
import StarterKit from 'https://esm.sh/@tiptap/starter-kit?deps=@tiptap/[email protected]'
const editor = new Editor({
element: document.querySelector('.element'),
extensions: [
StarterKit,
],
content: '<p>Your content.</p>',
})
</script>
</body>
</html>
@philippkuehn i think this is a bug, i will fix this, thanks 🙏
Any update?
Encountering this for packages that rely on React (I'm trying to force everything to use [email protected]).
@ije this makes esm.sh unusable for packages that transitively depend on React or THREE, which have to be globally unique. For example @react-three/fiber imports react-use-measure which imports [email protected] (the latest version is 18.1.0).