Pixel
Pixel•2y ago

How exactly do import maps work?

My import map works but I don't understand how!
"/": "./src/",
"./": "./",
"/": "./src/",
"./": "./",
If I import /a/b/c.js it imports from ./src/a/b/c.js. I like this. However, I have no idea about how this works! Could someone explain please? I like to understand what my code does and it bugs me if I don't :p
3 Replies
Pixel
Pixel•2y ago
I'll come clean haha, embarassingly I got this import map by guessing for long enough
AapoAlas
AapoAlas•2y ago
GitHub
GitHub - WICG/import-maps: How to control the behavior of JavaScrip...
How to control the behavior of JavaScript imports. Contribute to WICG/import-maps development by creating an account on GitHub.
AapoAlas
AapoAlas•2y ago
That's the spec for them at least 🙂