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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(pragma): add SWC instructions for Next.js #2020

Merged
merged 1 commit into from Nov 23, 2021
Merged
Changes from all commits
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
14 changes: 14 additions & 0 deletions packages/docs/src/pages/guides/jsx-pragma.mdx
Expand Up @@ -147,6 +147,8 @@ NOTE: this requires

### Using next.js

#### With Babel

```js
// babel.config.js
module.exports = {
Expand All @@ -168,3 +170,15 @@ module.exports = {

You can read more about
[customizing Babel config in Next.js docs](https://nextjs.org/docs/advanced-features/customizing-babel-config).

#### With SWC

In `jsconfig.json` or `tsconfig.json` (since Next.js 12.0.4):

```json
{
"compilerOptions": {
"jsxImportSource": "theme-ui"
}
}
```