DenoDDeno
Powered by
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";
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
}
async function fetch(
  input: string | Request | URL,
  init?: RequestInit,
): Promise<Response> {
  // impl
}
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

esbuild_deno_loader importing Deno modules
PixelPPixel / help
4y ago
`deno cache` with `node_modules_dir` moves sub-dependencies into `.deno/node_modules` dir
N!NZBRETTNN!NZBRETT / help
3y ago
deno compile include all node_modules...
njzyNnjzy / help
4w ago
Importing deno modules with import maps
sachawSsachaw / help
2y ago