Robin LindnerR
Denoβ€’4y agoβ€’
4 replies
Robin Lindner

Static compilation of deno modules

Is there a way to statically compile libraries into the .js bundle instead of dynamically retrieving them from deno.land.

The point is that I would like to test the Boa engine in the Deno environment and so the libraries are interfering.
Of course the Deno internals have to be implemented afterwards.

So that, for example, from the following code:
import { fetch } from "https://deno.land/x/file_fetch@0.2.0/mod.ts";


becomes:
the compiled code of https://github.com/lucacasonato/deno_local_file_fetch/blob/main/mod.ts

something like:
async function fetch(
  input: string | Request | URL,
  init?: RequestInit,
): Promise<Response> {
  // impl
}
Was this page helpful?