26 ms·
Importing an ES module without a bundler involves making a HTTP request, which costs time. Better KISS and fit all of JS in a single script.
by niutech 2y ago
Importing an ES module without a bundler involves making a HTTP request, which costs time.
Better KISS and fit all of JS in a single script.
- mg 2y agowhich costs time No sure this holds true anymore. When you go to a site like reddit.com which uses HTTP/2, you see a gazillion of requests for JS files, many starting at the same time and ending at the same time. I think that is because newer HTTP versions can put multiple requests in the same data packet. And even HTTP/3 is now supported by over 90% of browsers.