loading...

re: The Future of "View Page Source" VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Or, use preload links to preload all your JS, and use the await import function as needed, so the browser preloads and caches all your JS, but load...

I suppose that could work. I can see the appeal behind your method. It's definitely a much better developer experience without the build steps.

Personally, I still wouldn't rely on this behavior if I were to write a large application. Browser support for dynamic imports aside, there just seems to be more runtime overhead with ES modules than if I had just moved the import overhead at compile-time as a build step.

But then again, this is an unfortunate side effect of the "modern Web", where bundling code is just more network- and CPU-efficient than the more elegant ES modules. 😕

Don't get me wrong, I'd love to see a future where the Web is beautifully intuitive and semantic everywhere, but the reality of the situation just deems it otherwise.

ES modules are great, but the current climate of the modern Web forces me to add a tedious build step because it's a "best practice" for network and parser performance.

So yeah... As much as I want to keep my codebases simple like you do, large applications call for such complexities. ES modules are not exactly the most "sCaLaBLe" solution. I'd love to see the day when I'd be proven wrong, though.

Code of Conduct Report abuse