In v4, I could do this in order to get inline style tags added by react-dropdown-select to work with my Content Security Policy:
import createCache from '@emotion/cache'
import { CacheProvider } from '@emotion/react'
import { createRoot } from 'react-dom/client'
const emotionCache = createCache({
key: 'myApp',
nonce: window.NONCE_ID, // CSP nonce generated elsewhere
})
const router = /** ... */
const container = document.getElementById('app')
const root = createRoot(container)
root.render(
<CacheProvider value={emotionCache}>
<RouterProvider router={router} />
</CacheProvider>
)
Since v5 dropped emotion support, this is no longer possible. Is there an alternative way to allow the module's inline style tags in CSP using a nonce or is this a regression?
In v4, I could do this in order to get inline style tags added by react-dropdown-select to work with my Content Security Policy:
Since v5 dropped
emotionsupport, this is no longer possible. Is there an alternative way to allow the module's inline style tags in CSP using a nonce or is this a regression?