Skip to content

Commit

Permalink
Vite es-decorators configuration example
Browse files Browse the repository at this point in the history
  • Loading branch information
sorteam authored Nov 3, 2024
1 parent 9944edc commit afa0f0b
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 afa0f0b

Please sign in to comment.