index.js 300 B

12345678910111213
  1. var currentNonce;
  2. export var setNonce = function (nonce) {
  3. currentNonce = nonce;
  4. };
  5. export var getNonce = function () {
  6. if (currentNonce) {
  7. return currentNonce;
  8. }
  9. if (typeof __webpack_nonce__ !== 'undefined') {
  10. return __webpack_nonce__;
  11. }
  12. return undefined;
  13. };