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 🤔
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 🤔
I will look into it.
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:
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?
It’s nice to provide both routes, dropping the script tag in and away you go or fancy importing