Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
CSP webpack__nonce value lost when loading chunk from react-dom.development

I have set the webpack_nonce in the entry point of my library which take the value from WINDOW.NONCE_ID.

I got this nice little piece of code:

/* WEBPACK VAR INJECTION */(function(__react_refresh_utils__, __react_refresh_error_overlay__) {__webpack_require__.$Refresh$.runtime = __webpack_require__(/*! ./node_modules/react-refresh/runtime.js */ "./node_modules/react-refresh/runtime.js");
__webpack_require__.$Refresh$.setup(module.i);

/* global __webpack_nonce__ */
// eslint-disable-line no-unused-vars
__webpack_require__.nc = window.NONCE_ID; //eslint-disable-line no-global-assign, camelcase
...

So far so good. The build is configured to use lazy loading which in theory should not be a problem and so it seems since in production it does work the nonce is getting added to the inline styles

The problem is that when serving the bundle through webpack-dev-server the value when loading the chunk became undefined for some reason

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!