# Swc

> SWC Rust-based JS/TS compiler. Use for fast compilation. Use when this capability is needed.

- Skill: `tomevault-io/swc` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/swc`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/swc/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/swc

---


# SWC

SWC (Speedy Web Compiler) is a Rust-based extensible platform. It is the compiler inside **Next.js** and **Deno**.

## When to Use

- **Compilation**: Replacing Babel.
- **Minification**: Faster and often smaller than Terser.
- **Jest**: `@swc/jest` speeds up tests by 10x.

## Core Concepts

### Transforms

Supports standard transforms (React JSX, TypeScript, legacy decorators).

### Plugins (Wasm)

SWC plugins are written in Rust (Wasm), making them fast but harder to write than Babel plugins.

## Best Practices (2025)

**Do**:

- **Use `swc-loader`**: In Webpack configs.
- **Use `.swcrc`**: JSON configuration file (similar to `.babelrc`).

**Don't**:

- **Don't stick with Babel**: Unless you need a very niche Babel plugin that doesn't exist in SWC yet.

## References

- [SWC Documentation](https://swc.rs/)

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/g1joshi) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-16 -->

