Skip to main content
Module

x/enzastdlib/vendor/@deno-emit.ts>bundle

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
function bundle
import { bundle } from "https://deno.land/x/enzastdlib@v0.0.4/vendor/@deno-emit.ts";

Generate a single file JavaScript bundle of the root module and its dependencies.

Example

import { bundle } from "https://deno.land/x/emit/mod.ts";
const result = await bundle(
  "https://deno.land/std@0.140.0/examples/chat/server.ts",
);

const { code } = result;
console.log(code);

Parameters

root: string | URL

The root module specifier to use for the bundle.

optional
options: BundleOptions = [UNSUPPORTED]

Options to use when bundling.

Returns

Promise<BundleEmit>

a promise which resolves with the emitted bundle (and optional source map)