This library fixes an issue with Content Security Policy in Firefox when used with the MetaMask extension.
pnpm add --save-exact metamask-csp-firefox
Import the library on top of your application:
import 'metamask-csp-firefox'
/*
* rest of your code...
*/