Skip to main content
Module

x/aleph/compiler/mod.ts>transform

The Full-stack Framework in Deno.
Very Popular
Go to Latest
function transform
import { transform } from "https://deno.land/x/aleph@v0.3.0-alpha.25/compiler/mod.ts";

transform module by swc.

transform(
  '/app.tsx',
  `
    export default App() {
      return <h1>Hello World</h1>
    }
  `,
  {
    url: '/app.tsx'
    swcOptions: {
      target: 'es2020'
    }
  }
)

Parameters

url: string
  • the module URL.
code: string
  • the mocule code.
optional
options: TransformOptions = [UNSUPPORTED]
  • the transform options.