Skip to content

Commit d3ba510

Browse files
committed
[readme] add jsx runtime config to getting started
1 parent 9546866 commit d3ba510

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ export default function App() {
6161
`index.js` is the main entry point for cherry-cola. It will look for an exported function `main()` and will
6262
use the returned value to render HTML. `App.js` is an example component.
6363

64+
Then, add the cherry-cola jsx runtime to your `tsconfig.json`:
65+
66+
```json
67+
{
68+
"compilerOptions": {
69+
"jsx": "react-jsx",
70+
"jsxImportSource": "cherry-cola"
71+
}
72+
}
73+
```
74+
6475
Run `cherry-cola dev src/index.js` to start the dev server. Then, visit `localhost:3000`.
6576

6677
Alternatively, you can use the [`cherryCola()`](#cherrycolaentry-string) function in your own server to render the app.

0 commit comments

Comments
 (0)