Skip to main content
Module

x/lume/deps/esbuild.ts>transform

🔥 Static site generator for Deno 🦕
Very Popular
Latest
function transform
import { transform } from "https://deno.land/x/lume@v2.1.4/deps/esbuild.ts";

This function transforms a single JavaScript file. It can be used to minify JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript to older JavaScript. It returns a promise that is either resolved with a "TransformResult" object or rejected with a "TransformFailure" object.

  • Works in node: yes
  • Works in browser: yes

Documentation: https://esbuild.github.io/api/#transform

Type Parameters

T extends TransformOptions

Parameters

input: string | Uint8Array
optional
options: SameShape<TransformOptions, T>

Returns

Promise<TransformResult<T>>