zachleat@zachleat.com’s Mastodon Archive

Reply

@martynhoyer @ascorbic @eleventy

I’d recommend just linking directly to the webc component in the package, like this:

<img webc:import="npm:@unpic/webc/unpic-img.webc"></unpic-img>

But if you want to use npm imports without specifying a component file name, the component tag name informs what file to look for in the npm package, like:

<unpic-img webc:import="npm:@unpic/webc"></unpic-img>

11ty.dev/docs/languages/webc/#