Replies: 2 comments
-
Hi, In the NPM package there are multiple versions of the module.
Then you can use the following script to load in the CSP worker:
By adding the ?url after the import, Vite returns the correct url to the file including the hash. This way you won't have to manually put the file somewhere to load it in. |
Beta Was this translation helpful? Give feedback.
-
I also ran into this. The docs example is really confusing. Question @joepvtl, any particular reason for the vite alias? I got it to load with just |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I want to use this library but I cannot have blob: in the worker-src due to restrictive csp
In the documentation this is mentioned
<script> maplibregl.setWorkerUrl("${urls.js().replace('.js', '-csp-worker.js')}"); ... </script>Can somebody help me understand how this is used (especially in typescript) and what it’ll do that would remove the need of blob: in worker-src
Beta Was this translation helpful? Give feedback.
All reactions