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: src/docs/guide/usage/transformer.md
+154Lines changed: 154 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
- Transforming TypeScript to ESNext.
6
6
- Transforming React JSX to ESNext, with built-in React Refresh.
7
7
-[TypeScript Isolated Declarations Emit](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#isolated-declarations) without using the TypeScript compiler.
8
+
- Built-in support for popular plugins like styled-components.
8
9
9
10
## Installation
10
11
@@ -23,6 +24,159 @@ Rust usage example can be found [here](https://github.com/oxc-project/oxc/blob/m
Oxc transformer includes built-in support for popular transformation plugins to improve developer experience and build performance.
30
+
31
+
### React Refresh
32
+
33
+
React Refresh (also known as React Fast Refresh) provides hot reloading capabilities for React components during development. This plugin automatically instruments React components to preserve state during development.
34
+
35
+
#### Usage
36
+
37
+
React Refresh is automatically enabled when transforming JSX code in development mode. To configure it explicitly:
|`refreshReg`|`string`|`"$RefreshReg$"`| The name of the function to register components for refresh |
60
+
|`refreshSig`|`string`|`"$RefreshSig$"`| The name of the function to create signatures for refresh |
61
+
|`emitFullSignatures`|`boolean`|`false`| Whether to emit full signatures for better debugging |
62
+
63
+
### Styled Components
64
+
65
+
The styled-components plugin adds comprehensive support for styled-components with server-side rendering, style minification, and enhanced debugging capabilities.
0 commit comments