Skip to main content
Module

x/aleph/compiler/mod.ts>transpileSync

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

transpile code synchronously by swc.

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

Parameters

code: string
  • code string.
optional
opts: TransformOptions
  • transform options.