Skip to content

Commit

Permalink
Added JSON example for js_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
WebReflection committed Dec 15, 2023
1 parent 2dbc393 commit 8d44c6b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,22 @@ In *polyscript*, this is possible by defining one or more `[js_modules.X]` field
"https://cdn.jsdelivr.net/npm/worker-only" = "worker_only"
```

```js
{
"js_modules": {
"main": {
"https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet-src.esm.js": "leaflet",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css": "leaflet",
"https://cdn.jsdelivr.net/npm/html-escaper": "html_escaper"
},
"worker": {
"https://cdn.jsdelivr.net/npm/html-escaper": "html_escaper",
"https://cdn.jsdelivr.net/npm/worker-only": "worker_only"
}
}
}
```

```html
<!-- main case -->
<script type="pyodide" config="./that.toml">
Expand Down

0 comments on commit 8d44c6b

Please sign in to comment.