Skip to content

Commit d7bd8d7

Browse files
committed
emmm
1 parent 8005ddd commit d7bd8d7

4 files changed

Lines changed: 14 additions & 51 deletions

File tree

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -285,18 +285,20 @@ function App() {
285285
```
286286

287287

288-
### jsx2
288+
### jsx
289+
290+
For vite example
289291

290292
```js
291-
plugins: [
292-
[
293-
'@babel/plugin-transform-react-jsx',
294-
{
295-
runtime: 'automatic',
296-
importSource: 'fre',
297-
},
298-
],
299-
]
293+
export default {
294+
esbuild: {
295+
jsxFactory: 'h',
296+
jsxFragment: 'Fragment',
297+
jsxInject: `import { h, Fragment } from 'fre'`,
298+
target: 'es2020',
299+
format: 'esm'
300+
}
301+
}
300302
```
301303

302304
#### License

demo/src/use-memo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, useState, useMemo, useEffect } from '../../src/index'
1+
import { render, useState, useMemo, useEffect,h } from '../../src/index'
22

33
function Counter() {
44
const [count, setCount] = useState(0)

demo/src/use-state.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, useState, h, useEffect } from '../../src/index'
1+
import { render, useState, useEffect } from '../../src/index'
22

33
function App() {
44
const [list, setList] = useState([1, 2, 3])

demo/src/use-sync-external-store.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)