You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+14
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,20 @@
2
2
3
3
## Unreleased
4
4
5
+
### Add useAtYourOwnRisk_mutateSwcOptions option
6
+
7
+
The future of Vite is with OXC, and from the beginning this was a design choice to not exposed too many specialties from SWC so that Vite React users can move to another transformer later.
8
+
Also debugging why some specific version of decorators with some other unstable/legacy feature doesn't work is not fun, so we won't provide support for it, hence the name `useAtYourOwnRisk`.
Copy file name to clipboardexpand all lines: README.md
+14
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,20 @@ react({
93
93
});
94
94
```
95
95
96
+
### useAtYourOwnRisk_mutateSwcOptions
97
+
98
+
The future of Vite is with OXC, and from the beginning this was a design choice to not exposed too many specialties from SWC so that Vite React users can move to another transformer later.
99
+
Also debugging why some specific version of decorators with some other unstable/legacy feature doesn't work is not fun, so we won't provide support for it, hence the name `useAtYourOwnRisk`.
100
+
101
+
```ts
102
+
react({
103
+
useAtYourOwnRisk_mutateSwcOptions(options) {
104
+
options.jsc.parser.decorators=true;
105
+
options.jsc.transform.decoratorVersion="2022-03";
106
+
},
107
+
});
108
+
```
109
+
96
110
## Consistent components exports
97
111
98
112
For React refresh to work correctly, your file should only export React components. The best explanation I've read is the one from the [Gatsby docs](https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works).
0 commit comments