Skip to content

Commit

Permalink
docs: Vite es-decorators configuration example (#3955)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorteam authored Jan 30, 2025
1 parent bca3841 commit c04c24a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/enabling-decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,28 @@ With modern decorators, it is no longer needed to call `makeObservable` / `makeA
}
```

- Vite configuration

```js
// vite.config.js
{
plugins: [
react({
babel: {
plugins: [
[
"@babel/plugin-proposal-decorators",
{
version: "2023-05",
},
],
],
},
}),
]
}
```

## Using decorators

```javascript
Expand Down

0 comments on commit c04c24a

Please sign in to comment.