Skip to content

Commit

Permalink
Merge pull request #2020 from gpoole/patch-1
Browse files Browse the repository at this point in the history
docs(pragma): add SWC instructions for Next.js
  • Loading branch information
hasparus committed Nov 23, 2021
2 parents 1b3bef1 + fe10833 commit 934d497
Showing 1 changed file with 14 additions and 0 deletions.
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"
}
}
```

0 comments on commit 934d497

Please sign in to comment.