Saying this doesn't have a build step is like saying a python script that compiles and runs a C program from source has no build step.
Not at all. We are talking about SSR, and the need for a build step (on the backend). That should be pretty obvious considering the explicit mentions of running the code in the browser, jsx, ts, etc. (Not to mention the backend runtime cannot run typescript/jsx without build either)
> Building is creating the runnable artefact
That's not all that 'building' is...
> but in the context of the server this artefact is already runnable
No it's not. The JIT/interpreter within Deno cannot run this code without doing a build first. This is made very obvious and explicit in the Deno docs.
https://docs.deno.com/runtime/fundamentals/typescript/
> With its built-in TypeScript compiler, Deno will compile your TypeScript code to JavaScript with no extra config needed.
What I meant by "no build" is "no bundling". I elaborated more in this wiki: https://github.com/fullsoak/fullsoak/wiki/Concepts-&-Example...
Thank you for your help above in making things clearer <3
Hope that helps!
I'll take this to my desk & update the wordings towards your suggestions above - thank you!
Bun transpiles all typescript code before executing it in the JavaScriptCore runtime. That's an implicit on-startup build step.
https://docs.deno.com/runtime/reference/jsx/
Saying this is not a 'build step' is like saying a shell script that builds and runs a C program from source has no build step.
I would say so. Ultimately build step or not isn't a meaningful thing to care about. What matters is the cold start/runtime impact. In the case of deno/bun, the impact seem minuscule/not meaningful.
The two are closely related.
> In the case of deno/bun, the impact seem minuscule/not meaningful.
Seems like a pretty baseless assertion.
It's like language implementations that nominally aren't "compiled", like Python, but nonetheless compile to bytecode when you run the program
You can check the generated source code of the example deployment to see how it's deployed: https://fullsoak.onrender.com/
But spoiler: it's like in the 90s: each page request results in a text/html response, and the HTML doc then links in any .js or .css file it needs.
I elaborate more in this wiki: https://github.com/fullsoak/fullsoak/wiki/Concepts-&-Example...
I do wish to elaborate: since we use JSX/TSX, in theory we can in-line as much as we'd like. Here I include CSS in the component itself: https://github.com/fullsoak/bun-examples/blob/main/src/compo...
So it can be just 1 HTML resource + 1 js file for every unique path. And with preact-iso (or react router) we can make subsequent pages load on-the-fly without a hard browser refresh / hard resource reload. Like so: https://github.com/fullsoak/bun-examples/blob/main/src/compo...
But ultimately: I do see rooms for improvements re. resource optimizations. My personal wish is to use standard web specs such as "preload", "prefetch", "server push", etc. to optimize as much as possible, without taking the "bundling route" - so: just exploring a different taste, not that I have anything against the existing "build routes" :)
Also, separate HTTP requests allow for granular caching, and with HTTP/2 the overhead is minimal.
You're authoring in TSX and serving JS to browsers, so there's clearly a build step. How is your model different from e.g. vite serve?
How does it get deployed? Are the files translated to vanilla JS on request, or are they translated ahead of time and cached (in other words, a build step)?