From 8d44c6b78e69acec6d6d6c0c383a99efdbd98e88 Mon Sep 17 00:00:00 2001 From: webreflection Date: Fri, 15 Dec 2023 11:48:00 +0100 Subject: [PATCH] Added JSON example for js_modules --- docs/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/README.md b/docs/README.md index 5cc3811..dd105f5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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/leaflet@1.9.4/dist/leaflet-src.esm.js": "leaflet", + "https://cdn.jsdelivr.net/npm/leaflet@1.9.4/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