Javascript ImportMaps - Bye Bye Build Tools??

preview_player
Показать описание
ImportMaps are an upcoming browser feature that allows us to import NPM packages using 'Bare Specifiers' much the same as if we were using a bundler like Webpack, Rollup, Parcel etc. This Nascent tech is currently hidden behind a flag in most browsers but looks like it will be enabled in the near future.

In this tutorial we look at creating a LitElement custom element in the browser, without using any Build Tools! We see how the import map allows us to specify the URL to a module that we are using and also the URL of any dependencies that the modules contains. This was we can develop without a build tool and at the same time use bare specifiers just as is normally the case.

Link to the spec:

Рекомендации по теме
Комментарии
Автор

"Hey, thx for the video!
What if the module I'm importing in the import map has 20 dependencies? Do I need to include the paths for all 20 dependencies, just like you did for lit-html?

brunog.campos
Автор

Seems like the major players are trying to leave Webpack for good. I guess it's the end?
Great video btw, keep it up!

mikopiko
Автор

Thanks for the video. You cover some interesting technologies and topics. I like to see how you work to resolve issues. Once again, thanks for your efforts :-)

joebloggsnz
Автор

I gotta say though, the majority of the video consisted of you resolving errors caused by your misspelling, you should maybe prepare a bit more.

mikopiko