Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Mention SWC in TypeScript documentation. #33801

Merged
merged 2 commits into from Jan 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/basic-features/typescript.md
Expand Up @@ -37,7 +37,9 @@ Next.js will automatically configure this file with default values. Providing yo

You can also provide a relative path to a tsconfig.json file by setting `typescript.tsconfigPath` prop inside your `next.config.js` file.

> Next.js uses Babel to handle TypeScript, which has some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats), and some [compiler options are handled differently](https://babeljs.io/docs/en/babel-plugin-transform-typescript#typescript-compiler-options).
Next.js will by default use [Rust SWC](https://nextjs.org/docs/advanced-features/compiler) to compile TypeScript and TSX, resulting in a much faster build time.
leerob marked this conversation as resolved.
Show resolved Hide resolved

> Next.js will use Babel to handle TypeScript if `.babelrc` is present, this has some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats), and some [compiler options are handled differently](https://babeljs.io/docs/en/babel-plugin-transform-typescript#typescript-compiler-options).
leerob marked this conversation as resolved.
Show resolved Hide resolved

Then, run `next` (normally `npm run dev` or `yarn dev`) and Next.js will guide you through the installation of the required packages to finish the setup:

Expand Down