Skip to content

Commit ff8b70d

Browse files
committed
Move react support doc below configuration
1 parent 9e4bdb9 commit ff8b70d

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -125,30 +125,6 @@ The following configuration options allow you to customize or override the defau
125125
- **Returns**: Same `CompilerConfig` object as above
126126
- **`assets`** (`string`, `array`, or `null`): Specifies additional assets to include in the build, like `['**/*.css']`. Set to `null` to exclude assets.
127127

128-
### Adding React Support
129-
130-
To add React support to your library:
131-
132-
1. **Install React preset:**
133-
134-
```bash
135-
npm install --save-dev @babel/preset-react
136-
```
137-
138-
2. **Add to your `libwiz.config.js`:**
139-
```js
140-
module.exports = {
141-
// ... other config
142-
compiler: {
143-
presets: [['@babel/preset-react', { runtime: 'automatic' }]],
144-
plugins: [
145-
'@babel/plugin-proposal-class-properties',
146-
'@babel/plugin-proposal-object-rest-spread',
147-
],
148-
},
149-
};
150-
```
151-
152128
### Example Configuration
153129

154130
Here is an example of a configuration file (`libwiz.config.js`):
@@ -194,6 +170,30 @@ module.exports = {
194170
};
195171
```
196172

173+
### Adding React Support
174+
175+
To add React support to your library:
176+
177+
1. **Install React preset:**
178+
179+
```bash
180+
npm install --save-dev @babel/preset-react
181+
```
182+
183+
2. **Add to your `libwiz.config.js`:**
184+
```js
185+
module.exports = {
186+
// ... other config
187+
compiler: {
188+
presets: [['@babel/preset-react', { runtime: 'automatic' }]],
189+
plugins: [
190+
'@babel/plugin-proposal-class-properties',
191+
'@babel/plugin-proposal-object-rest-spread',
192+
],
193+
},
194+
};
195+
```
196+
197197
### Advanced Compiler Configuration Examples
198198

199199
#### Static Compiler Configuration (Object)

0 commit comments

Comments
 (0)