I've heard good things about Next but haven't used it myself. It looks like
they support both traditional SSR (on-demand rendering) and static export (generate .html pages) though, and that's pretty cool. Would love to see some benchmarks against other frameworks.
Static output is similar to, but a little different from what I was referring to though. That runs the application to its conclusion then exports the output. I was describing more of a transpilation step.
So for example, in the original argument I made for jQuery, we could convert DOM access functions like
$("#elem") to
document.getElementById("elem"). Or
$.ajax() to
XMLHTTPRequest (which would be
fetch today). Basically the same conversions the library was making for us, but speed it up by doing it ahead of time. Then you could either omit or slim down the jQuery library itself.
Because the abstracted code is generally smaller to write, you would eventually reach an inflection point where the converted code is larger than the data saved by omitting the library. That'd be a pretty large application though.
Svelte it seems similarly has
an inflection point. At that point running things through React's abstractions like JSX and vDOM would actually reduce the payload size (though maybe not the JS execution time on weaker CPUs).
Today's frameworks do a whole lot more than jQuery ever did. I won't pretend to have envisioned data bindings, code splitting, and their other novel features. But I am really happy to see the idea of compilation being explored as an optimization step.