News for hackers. Stuff that matters.
Re:Why is the JavaScript ecosystem like this by andrewstuart on Wednesday January 04, 2023 @04:26PM (#34251939)
Nicely put.

But what is this "build-less front-end" you speak of? Surely there's build somewhere, you're just hiding it?

Re:Why is the JavaScript ecosystem like this by javajosh on Wednesday January 04, 2023 @04:35PM (#34252089)
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.
Re:Why is the JavaScript ecosystem like this by andrewstuart on Wednesday January 04, 2023 @04:37PM (#34252107)
Surely you must use JavaScript libraries in your front end though ... don't they need compilation?
Re:Why is the JavaScript ecosystem like this by javajosh on Wednesday January 04, 2023 @04:40PM (#34252168)
Believe 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.
Re:Why is the JavaScript ecosystem like this by andrewstuart on Wednesday January 04, 2023 @05:02PM (#34252512)
>> 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.

Re:Why is the JavaScript ecosystem like this by javajosh on Wednesday January 04, 2023 @06:05PM (#34253262)
>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.

Re:Why is the JavaScript ecosystem like this by pwdisswordfish9 on Wednesday January 04, 2023 @06:33PM (#34253574)
> no substantial modern application can possibly be built without them

Check out Firefox.

Re:Why is the JavaScript ecosystem like this by pwdisswordfish9 on Wednesday January 04, 2023 @04:41PM (#34252182)
If you are joking/trolling can you help me get the joke?
Re:Why is the JavaScript ecosystem like this by 778hbff on Wednesday January 04, 2023 @04:36PM (#34252104)
Plain foo.js file. Included in the web page. That's it. No compilation, uglify, translation, crap. Plain file, straight from your scm.
Re:Why is the JavaScript ecosystem like this by Joeri on Wednesday January 04, 2023 @04:44PM (#34252224)
No build frontend dev is a thing, although obscure.

Preact has a no build path in their documentation: https://preactjs.com/guide/v10/getting-started/#no-build-too...

And here’s my no build react setup: https://github.com/jsebrech/create-react-app-zero

Re:Why is the JavaScript ecosystem like this by ElectricalUnion on Thursday January 05, 2023 @11:32AM (#34262312)
You can "do the build step" before deploying it to the CDN, kinda like how skypack esm modules work: https://www.skypack.dev/view/luxon

Of course, unless you do it tailored for your project, you don't get some nice features like tree shaking, but it's very convenient.