Skip to content

Commit adae521

Browse files
authored
fix: add nonce attribute to style tag
1 parent ca9879d commit adae521

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/inject-css.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export default function (css, options) {
3232
styleTag.setAttribute(k[i], options.attributes[k[i]]);
3333
}
3434
}
35+
if (typeof __webpack_nonce__ !== "undefined")
36+
styleTag.setAttribute("nonce", nonce);
3537
var pos = position === "prepend" ? "afterbegin" : "beforeend";
3638
container.insertAdjacentElement(pos, styleTag);
3739
return styleTag;

0 commit comments

Comments
 (0)