Skip to content
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

Add environment variable to optionally use local workbox #5391

Closed

Conversation

longsleep
Copy link

To test, add LOCAL_WORKBOX=true to the .env file, then build an app. The build directory should then show a local copy of the workbox runtime libraries and the generated service-worker.js should import from there instead of importing from external Google CDN.

@facebook-github-bot
Copy link

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!

@Timer
Copy link
Contributor

Timer commented Oct 10, 2018

Closing in favor of #5369, thanks!

@Timer Timer closed this Oct 10, 2018
@longsleep
Copy link
Author

Closing in favor of #5369, thanks!

Well this is not exactly the same - while #5369 ultimately also solves the issue i was hoping that this can be fixed with a smaller option in the next patch release instead of having to wait until #5369 is ready.

@Timer
Copy link
Contributor

Timer commented Oct 10, 2018

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 local mode the full override will be the best way to go.

@longsleep
Copy link
Author

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 local mode the full override will be the best way to go.

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.

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants