es-module-shims icon indicating copy to clipboard operation
es-module-shims copied to clipboard

Using importmap in web worker on a site with a content security policy

Open jnromero opened this issue 10 months ago • 1 comments

I am trying to use an importmap in a web worker on a site with a content security policy. I am following this example here:

https://github.com/guybedford/es-module-shims?tab=readme-ov-file#module-workers

Am I correct that currently, the only way to use the import map in the web worker is to add 'unsafe-eval' to the script-src? Just trying to confirm that this is true, and was wondering if there are any ways to work around this. Thank you!

jnromero avatar Apr 18 '24 18:04 jnromero

Yes, that's correct.

guybedford avatar Apr 19 '24 04:04 guybedford