Skip to content

Commit 8d44c6b

Browse files
committed
Added JSON example for js_modules
1 parent 2dbc393 commit 8d44c6b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,22 @@ In *polyscript*, this is possible by defining one or more `[js_modules.X]` field
281281
"https://cdn.jsdelivr.net/npm/worker-only" = "worker_only"
282282
```
283283

284+
```js
285+
{
286+
"js_modules": {
287+
"main": {
288+
"https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet-src.esm.js": "leaflet",
289+
"https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css": "leaflet",
290+
"https://cdn.jsdelivr.net/npm/html-escaper": "html_escaper"
291+
},
292+
"worker": {
293+
"https://cdn.jsdelivr.net/npm/html-escaper": "html_escaper",
294+
"https://cdn.jsdelivr.net/npm/worker-only": "worker_only"
295+
}
296+
}
297+
}
298+
```
299+
284300
```html
285301
<!-- main case -->
286302
<script type="pyodide" config="./that.toml">

0 commit comments

Comments
 (0)