Skip to content

Commit c137ef2

Browse files
christophercrchristopherthielen
authored andcommitted
fix(css): Add 'nonce' attribute to style-loader to prevent CSP violations due to inline styles (#43)
1 parent ff8d317 commit c137ef2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
loaders: [
5151
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } },
5252
{ test: /\.css$/, loader: [
53-
{ loader: 'style-loader', options: { hmr: false } },
53+
{ loader: 'style-loader', options: { hmr: false, attrs: { nonce: "uiroutervisualizer" } } },
5454
{ loader: 'css-loader?sourceMap-loader' },
5555
] },
5656
// inline base64 URLs for <=8k images, direct URLs for the rest

0 commit comments

Comments
 (0)