Patrick (he/him)
Patrick (he/him)โ€ข16mo ago

Smoother DX using 3rd party modules written in TypeScript in the Browser

Say, for instance, I want to use the "async" standard library's Deferred implementation in some code that runs in the Browser. Currently I manually copy the TypeScript source to a vendor folder and have my build step do the transpilation, then have my import map point to the transpiled code. Is there a way to have Deno or a complimentary tool do the transpiling with less manual intervention and allow a developer to use the original URL for the TypeScript module in their import map? [Aside: wasn't quite sure whether to post this in #help or #ideas . Kinda straddles the line to me ๐Ÿคท๐Ÿปโ€โ™‚๏ธ ]
5 Replies
Patrick (he/him)
Patrick (he/him)โ€ข16mo ago
also, if it doesn't exist already, I might throw together a prototype
๐•’๐•ฃ๐•ค๐•™
ry expressed interest in deno.land automatically compiling to js for the browser years ago nothing came of it but it's something they were interested in
Patrick (he/him)
Patrick (he/him)โ€ข16mo ago
that would be cool!
๐•’๐•ฃ๐•ค๐•™
GitHub
Redirect module path to exact mod.ts/js index.ts/js file ยท Issue #2...
Extracted from denoland/deno#17475 Take notice that this is in the dotland repo and is not a change to Deno's module resolution. This is a proposal to create a new endpoint on the registry that...
๐•’๐•ฃ๐•ค๐•™
GitHub
Serve precompiled JavaScript to the browser ยท Issue #1728 ยท denolan...
Reason It would be nice to be able to directly import TypeScript modules from the browser without having to use deno bundle. Suggestions Every TypeScript should be compiled once to JavaScript. If U...