Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
klesun authored Feb 15, 2024
1 parent 17c90ab commit 4b3e236
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Usage: ([sample project](https://klesun.net/entry/midiana/))
<script type="module">
import {loadModule} from 'https://klesun.github.io/ts-browser/src/ts-browser.js';
// language=file-reference
loadModule('./index.ts').then(indexModule => {
const entryScriptPath = './index.ts';
loadModule(entryScriptPath).then(indexModule => {
return indexModule.default(document.getElementById('composeCont'));
});
</script>
Expand All @@ -34,7 +35,8 @@ https://klesun-misc.github.io/ts-browser-react-example/
<script type="module">
import {loadModule} from 'https://klesun.github.io/ts-browser/src/ts-browser.js';
// language=file-reference
loadModule('./app.tsx', {
const entryScriptPath = './app.tsx';
loadModule(entryScriptPath, {
jsx: 2, // ts.JsxEmit.React
});
</script>
Expand Down

0 comments on commit 4b3e236

Please sign in to comment.