# Migrating from Babel to SWC — Babel and SWC: JavaScript Transpilation and Build Speed

Source: https://www.skillbyai.com/en/babel-swc/bs-migrate-babel-swc

> Migrate from Babel to SWC step by step: audit plugins, swap packages, convert config and verify the build.

## Assessment: is your project ready?

Check if your Babel plugins are available in SWC. If you use only common transforms (JSX, TypeScript, class properties), migration is straightforward. If you use exotic plugins, stay with Babel.

## Step 1: Uninstall Babel, install SWC

Remove Babel packages and add SWC. Test that the build still works.

```bash
npm uninstall @babel/core @babel/cli @babel/preset-env @babel/preset-react
npm install --save-dev @swc/core @swc/cli
```

## Step 2: Replace .babelrc with .swcrc

Convert your Babel config to SWC format. Most settings map directly.

```bash
# Keep .babelrc for reference, create .swcrc
cp .babelrc .babelrc.backup
# Edit new .swcrc with equivalent SWC settings
```
