Live data from Hacker News

You don't need a build step

deno.com

121–130 of 224 posts

Re: You don't need a build step

#121

So basically Deno has its own bundler that lets you not have a local build step and it gets bundled dynamically per-route as requested by users, right? This is very different from industry standards and possibly has many new concerns from devs, none of which are addressed in the article since it's treating the system as a perfect solution, which makes sense since it's a marketing page ("content marketing"). If it was…

It sounds like (it is a little vague) there is no bundling at all, the only thing Deno does magically at request time is transpiling TypeScript/JSX to browser-compatible JS. Beyond that I think the idea is it relies on native ES module imports (and import-maps), both of which are browser standards

Being a bit hand-wavey, Deno's approach sounds like full-stack JS converging to PHP-like patterns, which wouldn't be a bad thing.

Re: You don't need a build step

#122
post #87
post #54

> What exactly needs to happen to make server-side JavaScript run in the browser? That sounds like an oxymoron to me. I have honestly no idea what they mean by that. To me, a browser is client-side software, so saying you want to run server-side JS on it doesn't make any sense. They mention it several times in the article but I simply can't follow. Could someone with a deeper understanding ELI5 this to me?

Full stack devs working with JS on the backend love to be able to reuse their code on front and back end when desired. This question is relevant to them and them only.

Like using libraries, or packages. I can reuse those on the front-end, the back-end, command line tools, or wherever else I want.

Re: You don't need a build step

#123
post #116

I worked on JS infra for Google. One thing we found in this space is that when your apps get very large in terms of number of source files, there is a developer-impacting load time cost to the unbundled approach. That is, your browser loads the entry point file, then parses it for imports and loads the files referenced from there, then parses those for imports and so on. This process is not free. In particular, even…

Google apps always seem to stand out with an especially large amount of requests. Does Google use a proprietary module system for these runtime imports?

I've only seen this from afar when using the Maps JS API.

Re: You don't need a build step

#124
Of course Deno has a build step. The difference is you don't have to configure it and it happens on demand rather than aot.

It's definitely an improvement but the title is misleading.

Re: You don't need a build step

#125
They make you read an entire article about how bad build steps are, only to present you with the (no less appealing) alternative of JIT compliation with URLs. This does nothing to improve the "sea of dependencies" problem they spent so much time pointing out as a bad thing.

Re: You don't need a build step

#126
Great clickbait title, makes people wanna jump in the comments and say the OP is wrong.

I mean if we wanna get really pedantic about it then yes there will always be a build step no matter what you do, one could argue saving the file and alt-tabbing to the browser is a build step, but that's not the point is it? The idea is to lower that friction as much as possible and JIT is perfect for that

Re: You don't need a build step

#127

Earlier quoted context omitted.

They are not using their own bundler. They are using esbuild at runtime to generate bundles for individual islands when the process starts up. Then they store those files in memory in a Map. When the bundle files are requested, it just pulls the copy that was generated at runtime. Here is a link to the source where esbuild is used. https://github.com/denoland/fresh/blob/main/src/server/bundl... I personally think it…

Man the things that pass for innovation in the node-adjacent space continues to blow my mind. It feels like hte horrors of /r/programmerhumor meets generic internet hype-beast cycles.

A poor craftsman blames their tools.

Re: You don't need a build step

#128
sure these framework may do just in time transpilation and compression, that doesn't mean you don't have a build step.

copying the code to the server becomes the build step.

except now you have no chance to lint the code before shipping it

"but I can lint it on my machine"

good, then you have a build system, and you may as well just get the optimized stuff on the server, since server startup time depends on your code size at some point or another, and you pay for that.

Re: You don't need a build step

#129

So basically Deno has its own bundler that lets you not have a local build step and it gets bundled dynamically per-route as requested by users, right? This is very different from industry standards and possibly has many new concerns from devs, none of which are addressed in the article since it's treating the system as a perfect solution, which makes sense since it's a marketing page ("content marketing"). If it was…

> How does this work, well, with absolutely anything else? If I want my front-end in React? Vue? etc.

It doesn't. Fresh uses Preact and that's it.

Re: You don't need a build step

#130
post #4

I tend to stick with script tags as much as I can. Really the problem are all the frameworks pushing people to create a build step. Their excuse is optimising the code size, but for most cases that matters little, I don't mind including all of tailwind or font-awesome. So please, if you own a framework like this, make sure a script tag with a CDN link is easily copyable.

> Really the problem are all the frameworks pushing people to create a build step.

I doubt it.

People moved on from jQuery and/or vanilla because they needed to produce more sophisticated apps. And even in those days of yore, for any non-trivial project you still needed to concatenate and minify your code.

BTW Preact can be used without a build step.

Post reply on HN