Dustin
Dustin2mo ago

How to `deno bundle` to single TypeScript file?

Hi there, first of all thanks a lot for this awesome project. I'm really happy to get back deno bundle. On the Blogpost https://deno.com/blog/v2.4#deno-bundle the author mentioned that deno bundle is for...
"... creating single-file JavaScript or TypeScript bundles."
With the docs I could not find out how to configure deno bundle to output a typescript file or at least a .d.ts file. Is this a mistake in the blog? Can anyone explain how to do that? Thanks! Cheers Dustin
Deno
Deno 2.4: deno bundle is back | Deno
Deno bundle is back, alongside the addition of bytes and text imports, stabilized built-in OpenTelemetry, a new --preload flag, simplified dependency management with deno update, and more.
4 Replies
marvinh.
marvinh.2mo ago
I guess the phrasing was more meant to imply that you can use TypeScript code as input files not as the output format.
Dustin
DustinOP2mo ago
Alright, thank you! :deno_thankyou:
eugene_ter
eugene_ter2mo ago
But it clearly says: >Deno 2.4 restores the deno bundle subcommand for creating single-file JavaScript or TypeScript bundles. It supports both server-side and browser platforms, works with npm and JSR dependencies, and includes automatic tree shaking and minification via esbuild.
marvinh.
marvinh.2mo ago
Thanks for the feedback. We'll update the phrasing

Did you find this page helpful?