-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle nonce on entry.worker.js? #259
Comments
@TimoWestland I didn't add support to modify the script injection, but you can disable the auto-script injection and use it yourself. In your remixPWA({
registerSW: null
}) And then, you can add the script to your root manually: monorepo/packages/dev/src/plugins/loader.ts Lines 13 to 38 in dda9d68
I would work on extending the script support tho 👍! |
Thanks for your suggestion ❤️! I am taking this into consideration for the next major roadmap, including shipping a component to do just this |
I was following the steps in the offline guide using: https://remix-pwa.run/docs/main/offline which is using the epic-stack.
However, the epic stack uses a nonce on all scripts for the CSP. This nonce is not added to the entry.worker.js file that is created, which is causing this error to be logged to the console, and afaict, prevents the service worker from registering.
Is there a way to add the nonce to this service worker script?
The text was updated successfully, but these errors were encountered: