Describe the bug
When enforcing Trusted Types with the require-trusted-types-for CSP directive, Web Workers stop working and no existing Trusted Type policy can make them work, namely svelte-trusted-html and svelte-trusted-url.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-pvqfrgpg
Logs
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 22.22.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@sveltejs/adapter-auto: 7.0.1 => 7.0.1
@sveltejs/kit: 2.57.1 => 2.57.1
@sveltejs/vite-plugin-svelte: 6.2.4 => 6.2.4
svelte: 5.55.3 => 5.55.3
vite: 7.2.2 => 7.2.2
Severity
blocking an upgrade
Additional Information
No response
Describe the bug
When enforcing Trusted Types with the
require-trusted-types-forCSP directive, Web Workers stop working and no existing Trusted Type policy can make them work, namelysvelte-trusted-htmlandsvelte-trusted-url.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-pvqfrgpg
Logs
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 22.22.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.8.2 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: @sveltejs/adapter-auto: 7.0.1 => 7.0.1 @sveltejs/kit: 2.57.1 => 2.57.1 @sveltejs/vite-plugin-svelte: 6.2.4 => 6.2.4 svelte: 5.55.3 => 5.55.3 vite: 7.2.2 => 7.2.2Severity
blocking an upgrade
Additional Information
No response