magento-research / venia-pwa-concept

(Defunct) Moved to https://github.com/magento-research/pwa-studio
Open Software License 3.0
34 stars 19 forks source link

fix(sw): handle dev serviceworker 404 #68

Closed zetlen closed 6 years ago

zetlen commented 6 years ago

Modified src/index.js to only register a service worker if process.env.SERVICE_WORKER_FILE_NAME is truthy.

Modified webpack.config.js to set process.env.SERVICE_WORKER_FILE_NAME to false in development mode, unless the special ENABLE_SERVICE_WORKER_DEBUGGING env var is truthy.

Now, service workers are only generated OR requested:

Fixes #64.

zetlen commented 6 years ago

This one is right in the middle of @jimbo's workflow, so we'll wait for him to approve before merging.

DrewML commented 6 years ago

@zetlen with @jimbo out for a week, would prefer to land this and we can handle the conflicts.

magento-cicd2 commented 6 years ago

CLA assistant check
All committers have signed the CLA.