Currently using dynamic substitutions with the inline style tag:
<script>
globalThis.import_meta_env = JSON.parse('"import_meta_env_placeholder"');
</script>
Unfortunately, this requires adding unsafe-inline as an option to the script-src value when using the Content-Security-Policy header.
Is there an alternative mechanism available, which would allow this code to reside in a "real" script?