I'm working on some Deno projects and would like to be able to compile TypeScript to JavaScript to run in the browser (since TS is not yet supported). When I worked with NodeJS I installed the tsc compiler using npm but it seems overkill to install a second JavaScript runtime (NodeJS) just to get access to tsc. Does Deno have a compiler built-in?
I'm running Ubuntu server.
Sadly, As of Deno 1.31, the built-in bundler is now deprecated
Update: As of Deno 2.4 (June 2025) the bundler was reinstated! And has some support for the web. Its not exactly what you're looking for, but it will convert a typescript file into a JS file, and you can add the --watch argument to have it continually convert.
Old Answer:
However, the built-in bundler was never really made to do web bundling, its just designed to bundle all the code into one file.
If that is all you want (one big JS file) I've created a deno package that tries to stay true to the original deno bundle:
https://github.com/jeff-hykin/deno_bundle. It uses the official deno plugin for ES build under the hood. It supports node builtin imports but will never support npm imports.
If you specifically want to bundle for the web, I'd recommended Vite (deno install -g npm:vite) with the deno plugin or some other dedicated bundling tool
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With