Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 955 Bytes

getting-started.mdx

File metadata and controls

48 lines (38 loc) · 955 Bytes

import { Callout, Tabs, Tab } from 'nextra-theme-docs' import Link from 'next/link'

Getting Started

Installation

The easiest way to try SWC is using the Playground.

Otherwise, run the following to download pre-built binaries:

<Tabs items={['pnpm', 'npm', 'yarn']}> bash pnpm add -D @swc/cli @swc/core bash npm i -D @swc/cli @swc/core bash yarn add -D @swc/cli @swc/core

Then, you can transpile your first file and emit to stdout:

npx swc ./file.js

Supported Binaries

SWC can be downloaded and used as a pre-built binary, or built from source. Currently, the following binaries are provided:

  • Mac (Apple Silicon)
  • Mac (x64)
  • Linux (x86_64)
  • Linux (aarch64)
  • Linux (armv7)
  • Alpine Linux (also install @swc/core-linux-musl)
  • Android (aarch64)
  • Windows (win32-x64)
  • Windows (ia32)