News for hackers. Stuff that matters.
Re:Why Htmx Does Not Have a Build Step by semiquaver on Friday August 25, 2023 @02:27PM (#37265376)
Crossing my fingers that the proposal for allowing (browser-ignored) type annotations in javascript progresses: https://tc39.es/proposal-type-annotations/

Between that, HTTP2/3 and ES modules many of the downsides for building apps with no compile step are almost completely mitigated.

Re:Why Htmx Does Not Have a Build Step by nwienert on Friday August 25, 2023 @02:37PM (#37265521)
Does http2 solve waterfall imports? Also wouldn't tree shaking still be unsolved? What about minification?

IMO build step woes are really overstated, my build step has linting, type checking, optimization, bundle analysis size diff checks, enables JSX, and is basically necessary for development anyway as you get hot reloading, compiler-added features for better debugging, etc.

Re:Why Htmx Does Not Have a Build Step by ryncewynd on Friday August 25, 2023 @02:49PM (#37265675)
Care to share your build set up? I'd very much appreciate it

I haven't done js since jquery days, but keen to get into modern js development

Re:Why Htmx Does Not Have a Build Step by nwienert on Friday August 25, 2023 @03:08PM (#37265888)
I maintain Tamagui, so the tamagui starter kit basically is it, try `npm create tamagui`
Re:Why Htmx Does Not Have a Build Step by mixedCase on Friday August 25, 2023 @05:57PM (#37267510)
>Does http2 solve waterfall imports?

It used to, but browsers ruined it because they didn't want to help improve caching support

Re:Why Htmx Does Not Have a Build Step by semiquaver on Friday August 25, 2023 @07:14PM (#37268201)
Waterfall imports are solved by rel=modulepreload.
Re:Why Htmx Does Not Have a Build Step by tomjen3 on Saturday August 26, 2023 @06:26AM (#37271445)
HTTP2 allows the server to push files to the browser.

If you don't have tons of code, tree shaking and minification is not that important. If you depend on a couple libraries (Jquery, for example) those can be minified and just refered to directly in the source.

Re:Why Htmx Does Not Have a Build Step by spiffytech on Saturday August 26, 2023 @10:47AM (#37273384)
Chrome removed support for HTTP/2 Server Push last year.

As I remember, it never saw broad adoption because it was technically challenging to integrate with, and it tended to push a lot of resources clients already had, so it wasn't a big win for efficiency anyway.

Re:Why Htmx Does Not Have a Build Step by semiquaver on Saturday August 26, 2023 @12:10PM (#37274088)
HTTP early hints still exists and can achieve similar things as server push without wasting bandwidth.
Re:Why Htmx Does Not Have a Build Step by benatkin on Friday August 25, 2023 @02:36PM (#37265509)
Wouldn't that conflict with possible future optional static typing? It's only Stage 1. I'm hoping it doesn't make it.
Re:Why Htmx Does Not Have a Build Step by Someone1234 on Friday August 25, 2023 @03:06PM (#37265861)
Can you explain why the two proposals would "conflict?" Seems like they're proposing the same thing to me.
Re:Why Htmx Does Not Have a Build Step by benatkin on Friday August 25, 2023 @04:08PM (#37266419)
It would be hard to separate ignored ones from ones that would use a possible future optional static typing system. They would possibly have to use a different, uglier syntax.
Re:Why Htmx Does Not Have a Build Step by Someone1234 on Friday August 25, 2023 @05:06PM (#37267049)
I'm not sure I follow. Both proposals are suggesting that browser's engines ignore the syntax completely to allow some other, external, process to check them.

They use slightly different wording but are describing the same basic idea: This syntax will be ignored entirely and then optional/other process can use this area for whatever.

Re:Why Htmx Does Not Have a Build Step by benatkin on Friday August 25, 2023 @07:02PM (#37268100)
There are other languages that have optional static typing that don't treat types as comments. JavaScript could evolve to add support for this.