-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.html
More file actions
34 lines (33 loc) · 1.01 KB
/
build.html
File metadata and controls
34 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/react",
"react-dom/client": "https://esm.sh/react-dom/client",
"react/jsx-runtime": "https://esm.sh/react/jsx-runtime",
"@knighted/jsx/react": "https://esm.sh/@knighted/jsx/react",
"tts-react": "./packages/tts-react/dist/index.js"
}
}
</script>
<title>ESM + CDN + Import Map + @knighted/jsx/react</title>
</head>
<body>
<script type="module">
import { createRoot } from 'react-dom/client'
import { TextToSpeech } from 'tts-react'
import { reactJsx } from '@knighted/jsx/react'
createRoot(document.body).render(
reactJsx`
<${TextToSpeech} markTextAsSpoken>
<p>Hello from tts-react.</p>
</${TextToSpeech}>
`
)
</script>
</body>
</html>