A very small test application for demonstrating issue with Rspack + Module Federation + Trusted Types
Module Federation in Rspack does not currently support Trusted Types.
We can see how this does not work when Trusted Types are required, but does when they are not.
- 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' assignment.
error in console.
- open packages/host/serve.json and change
Content-Security-Policy
toXXXContent-Security-Policy
- repeat steps above and now see the the app loads successfully now that the CSP for Trusted Types is not defined in the header.