DEV Community

loading...

Discussion on: Great fun with Deno - My First Deno Framework

oknoorap profile image
Ribhararnus Pracutian Author

I don't think TypeScript (or Deno) can compile codes into minify version 😁, but we can do that later using terser or TypeScript plugin or similar tool. That's what I know, maybe someone knows better than me ✌️

Thread Thread
swapnil0545 profile image
Thread Thread
oknoorap profile image
Ribhararnus Pracutian Author

I agree with you, with Deno we can run our code faster enough on the server, even we're not bundling it.

Thread Thread
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Yes, I was referring to frontend code, with problems of

  • Bundle size and data usage on the clients
  • caniuse.com/ i.e. browser support

I almost never minify backend code. Just mere tsc. Not even Babel. Never that big compared to node_modules anyway.

node_modules is heavy.

Thread Thread
oknoorap profile image
Ribhararnus Pracutian Author

Thats why Deno is the big rescue here 😁, we don't need node_modules anymore.

Thread Thread
michaelcurrin profile image
Michael

There's an open issue for this.

github.com/denoland/deno/issues/6900

Recommended alternative by a commenter:

$ deno bundle https://deno.land/std@0.79.0/http/file_server.ts | esbuild --minify > file_server.min.js
$ deno run --allow-net --allow-read file_server.min.js
Enter fullscreen mode Exit fullscreen mode
Forem Open with the Forem app