Add environment variable to optionally use local workbox#5391
Add environment variable to optionally use local workbox#5391longsleep wants to merge 1 commit intofacebook:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Closing in favor of #5369, thanks! |
|
Adding configuration for one-off tasks is not something we normally do. In this case, most users are going to be fine with CDN so if you want to opt-out and into the |
I understand - though i doubt that most users are going to be fine with CDN. Imho its more like most users do not use a CSP and thus do not realize that the service worker loads stuff from Google. In any case the full override is fine but since it is not merged yet, i was wondering if there was a quick solution. |
To test, add
LOCAL_WORKBOX=trueto the.envfile, then build an app. The build directory should then show a local copy of the workbox runtime libraries and the generatedservice-worker.jsshould import from there instead of importing from external Google CDN.