Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

🔥 JavaScript import maps are now in all the browsers! Here is how they work with ES modules.

129,817 görüntüleme • 3 yıl önce •via X (Twitter)

10 Yorum

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

Node.js also supports something very similar to import maps. It must be prefixed with '#' and can be used as a wildcard. There is talk + experiments around supporting the full spec via Node.js Policies Deno supports the importmap spec

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

TypeScript has `path` where you can do something very similar as well, but needs some work from your bundler to work. Maybe once we see Node.js pick up import maps, the TS paths can be replaced with import maps. Web standards?

Jake profil fotoğrafı
Jake3 yıl önce

I wonder how the dependency conflicts would be solved in this context 🤔. Or is this just another way of importing a library like a regular script src tag?

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

It only resolves them 1 level deep, so your dependencies would have to resolve themselves or have their own import map. So i'd expect the same issues that we have with npm

Mihemed Şahîn profil fotoğrafı
Mihemed Şahîn3 yıl önce

🔥 So excited to try it.

Joaquin Beceiro profil fotoğrafı
Joaquin Beceiro3 yıl önce

Excellent for testing avoiding installing modules for a simple test application! Thank you!!

Url Sweatshirt profil fotoğrafı
Url Sweatshirt3 yıl önce

Was not prepared for the safari dev tools jump scare at the end

Joshua Koudys profil fotoğrafı
Joshua Koudys3 yıl önce

Good for those of us who don't need to transpile any JSX.

k644 profil fotoğrafı
k6443 yıl önce

Cool!

35961 profil fotoğrafı
359613 yıl önce

#JavaScript Is boxing about putting two people in a box? In JavaScript, Boxing is the automatic conversion of strings to objects when methods are called on them.

Benzer Videolar