Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fresh/src/server/deps.ts>esbuildTypes.transform

The next-gen web framework.
Extremely Popular
Go to Latest
function esbuildTypes.transform
import { esbuildTypes } from "https://deno.land/x/fresh@1.1.3/src/server/deps.ts";
const { transform } = esbuildTypes;

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-api

Parameters

input: string
optional
options: TransformOptions