Griffel, CSS-in-JS and Content-Security-Policy in Fluent UI React v9 #28750
-
I'd like to enable Content-Security-Policy Is there a way to enforce not using CSS-in-JS or otherwise enable Content-Security-Policy |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
![]() The full error message is descriptive, do Alternatively, you can configure CSS extraction and avoid runtime insertion and need for |
Beta Was this translation helpful? Give feedback.
The full error message is descriptive, do
style-src 'unsafe-inline
or apply nonce. Here is guidance on how to apply nonce: https://react.fluentui.dev/?path=/docs/concepts-developer-advanced-configuration--page#content-security-policies-cspAlternatively, you can configure CSS extraction and avoid runtime insertion and need for
style-src 'unsafe-inline'
at all, https://griffel.js.org/react/css-extraction/with-webpack.