Skip to content

Commit

Permalink
fix(css): Add 'nonce' attribute to style-loader to prevent CSP violat…
Browse files Browse the repository at this point in the history
…ions due to inline styles (#43)
  • Loading branch information
christophercr authored and christopherthielen committed Feb 14, 2018
1 parent ff8d317 commit c137ef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
loaders: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } },
{ test: /\.css$/, loader: [
{ loader: 'style-loader', options: { hmr: false } },
{ loader: 'style-loader', options: { hmr: false, attrs: { nonce: "uiroutervisualizer" } } },
{ loader: 'css-loader?sourceMap-loader' },
] },
// inline base64 URLs for <=8k images, direct URLs for the rest
Expand Down

0 comments on commit c137ef2

Please sign in to comment.