Closed michielbdejong closed 1 month ago
Using webpack probably?
This is also what rdflib uses
Here is a working example of how you can use the module with Plain HTML and ESM import, without a build step.
The key is to generate an import map, which you can do e.g. via https://generator.jspm.io
An application that wants to use this module either has to create a bundle itself, or use importmaps. I do not think it is recommended to do the bundling in the library itself. Otherwise we need to include rdflib and all its dependencies as well. Usually a client app needs more than only this module as a dependency. If everything is bundled already there will be a lot of code duplication.
I found a simpler example using esm.sh and added it to the readme: https://github.com/solid-contrib/data-modules/tree/main/contacts#usage-in-the-brower-via-cdn
This should be a sufficient solution to run it in a browser without any build / install step.
Hi @angelo-v,
Modern javascript practices notwithstanding ;) I would like to include your data module as a bundled and minified .js file that I can directly put into a
<script src="">
tag in my html. I tried using a<script module src="">
tag but didn't get that working.