avatar
David Darnes @darn.es

I guess what you could do is create a json file that is your import map, consume it with eleventy to pass through the files and then insert it into a script tag as your import map 🤔

aug 31, 2025, 6:40 pm • 1 0

Replies

avatar
Michael G @g12n.de

I will look into it.

aug 31, 2025, 6:56 pm • 1 0 • view
avatar
David Darnes @darn.es

Only drawback to this, at least with my web components, is that there’s nothing to really import. My component scripts are self initiating. I have considered employing @zachleat.com’s approach to allowing both use cases:

sep 1, 2025, 9:11 am • 0 0 • view
avatar
Michael G @g12n.de

Well. We can’t really expect every author to stick to one pattern. So basically a way to collect the JS files and drop them into a folder is what we look for. Damn. How did we do that in jquery times?

sep 1, 2025, 9:26 am • 1 0 • view
avatar
David Darnes @darn.es

It’s nice to provide both routes, dropping the script tag in and away you go or fancy importing

sep 1, 2025, 9:43 am • 0 0 • view