4 ms·
The browser itself performs a kind of build step. It happens per script tag, and you can catch "compilation errors" in your own code using window.onerror if yo
by javajosh 4y ago
The browser itself performs a kind of build step. It happens per script tag, and you can catch "compilation errors" in your own code using window.onerror if you want to.
- andrewstuart 4y agoSurely you must use JavaScript libraries in your front end though ... don't they need compilation?
- javajosh 4y agoBelieve it or not, using libraries, compiled or otherwise, is not a requirement of either the HTML or Javascript specifications! The single biggest benefit of front-end builds is modularization; however browsers support that natively now (e.g. script type=module), and have for some years.
- andrewstuart 4y ago>> using libraries, compiled or otherwise, is not a requirement of either the HTML or Javascript specifications But no substantial modern application can possibly be built without them. I can see that using modules could avoid the need for compilation.
- javajosh 4y ago>no substantial modern application can possibly be built without them. That's certainly false, since substantial applications predate React, Angular, svelte, etc. But you have a point. Steve Yegge once wrote that his company wanted to write a word processor in assembly and it seemed like a good idea at first, but then it was like drawing a straight line 100m long using only 2mm line-segments. The major purpose of these libraries is to increase the "length of the line-segments" to something more consistent with the distance you want to cover. The question is whether or not their exists a unit of abstraction in raw js/html that serves this same purpose. E.g. it's a demonstration proof. Working on it.
- deleted 4y ago[deleted]
- pwdisswordfish9 4y ago> no substantial modern application can possibly be built without them Check out Firefox.
- deleted 4y ago[deleted]