Transpile TS to JS
My app is serving a rendered ejs template as html.
Inside my html there is
how does my app now return the typescript as javascript?
I just get this error:
Im pretty new to deno and ts in general, so bear with me :)
7 Replies
it's actually seeing a different file mime type e.g.
video/mp4
. I believe your HTML is seeing the file extension .ts
as video/mp2t
. but i do have the same question, does deno support TS -> JS ?Deno supports running TypeScript code, but the browser does not. You'll need to transpile your TypeScript code to JavaScript before sending it to the browser. The recommended way to do that is with Esbuild and the Esbuild Deno Plugin.
On a side note, the
.ts
file extension isn't only used for TypeScript files.got it doc
is tsc fine as well?
¯\_(ツ)_/¯
I think it worked, thanks for the help :)
You can also do minify
As one of the options
That sounds good, Ill give it a shot