Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fastro/build/deps.ts>esbuild.transform

Fast and simple web application framework for deno
Go to Latest
function esbuild.transform
import { esbuild } from "https://deno.land/x/fastro@v0.83.5/build/deps.ts";
const { transform } = esbuild;

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

Parameters

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