Reputation: 1307
Clarity from VMWare is a design system usable by Angular or by Vanilla JS. I'm used to build application with the Angular version, but now i need to use Clarity in an HTML/vanilla Js application.
The problem is that when i follow the documentation, the import of the web components is always failing : Uncaught TypeError: Failed to resolve module specifier "@cds/core/icon/register.js". Relative references must start with either "/", "./", or "../".
I create a stacklitz project to display a simple button, but it's not rendered at all
https://stackblitz.com/edit/stackblitz-starters-k3kbl2?file=index.html
Open the console and see the javascript error
Upvotes: 0
Views: 38
Reputation: 1307
To use Clarity web components, you need to use a JS bundler (it's not in the official documentation). You can use Webpack, RollUp, Vite, whatever.
Upvotes: 0