rspack
rspack copied to clipboard
[Feature]: ModuleFederation: Unable to require trusted types via CSP
System Info
System: OS: Windows 11 10.0.22631 CPU: (40) x64 Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz Memory: 34.83 GB / 63.66 GB Binaries: Node: 20.11.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD pnpm: 8.15.6 - C:\Program Files\nodejs\pnpm.CMD Browsers: Edge: Chromium (125.0.2535.85) Internet Explorer: 11.0.22621.3527
Details
Rspack + Module Federation cannot load script files when Trusted Types are enabled via CSP.
Reproduce link
https://github.com/eatlakson/rspack_mf_tt
Reproduce Steps
- install dependencies:
yarn - build the packages:
yarn build - start the server:
yarn start - navigate to
http://localhost/ - app is unable to load due to
This document requires 'TrustedScript' assignmenterror in console.