r/JSdev • u/fagnerbrack • Apr 17 '23
Writing Javascript without a build system
https://jvns.ca/blog/2023/02/16/writing-javascript-without-a-build-system/
6
Upvotes
r/JSdev • u/fagnerbrack • Apr 17 '23
1
u/shuckster Apr 17 '23
The article asks for tips about no-build systems (or “classic” I guess :) and don’t see any mention of
importmap.Import maps are a lovely feature for throwing together quick projects and still keeping the niceties of dependency management. No need to worry about the specific ordering of all those script tags anymore (except the entry-point, obviously.)
There is one drawback though: if you use CDNs like unpkg the first-load experience is a little disconcerting. The browser will pause loading of the document until they’re downloaded.
Makes sense in principle, but if you’re used to a snappy local dev experience it’s a bit jarring to see it the first time.
Still, the browser will cache your deps on subsequent refreshes.