Are we ready for javascript without a build step on the front end in 2023? - eviltoast

On the current typescript / anti-typescript internet drama I saw someone mention javascript without a build step.

Do you think we’re already there?

Last time I attempted it:

  • there were too many libraries I couldn’t import
  • JSX (using babel) had a warning saying you shouldn’t do it in the browser for production
  • there was some advice against not using a bundler, because several requests for different .js files is slower and bigger than a bundled package
  • jeremyparker@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    but for anything beyond a very simple UI, you always end up with something that needs to be called in JS.

    Isn’t that why god made HTMX? Jokingly asked, but legitimate question - I don’t know much about WASM’s reach - and I can’t seem to watch that video on the train. Could HTMX (+/- hyperscript) take it from there?

    • jvisick@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      You could do HTMX and WASM, but they both have the same problem in that they generally replace elements in the DOM as opposed to interacting with existing elements in the DOM, and most rendering on both HTMX and WASM actually happens through JavaScript calls.

      In either case you’re limited to only interact with the DOM at the level of abstraction that the framework provides through “behind the scenes” JavaScript calls which will always be a subset of the DOM manipulation that is possible by directly using JS. At least, until there’s a standard DOM access API for WASM.

      • jeremyparker@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I keep trying to find a way to play with a web dev stack that doesn’t involve JavaScript, but I think that might be a pipe dream…