Vue 3 Layer0 Static Example with Service Worker Enabled #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finally, service worker with Vue (2 and 3) enabled, and working demos deployed with Layer0! 🚀
Vue 3:
GitHub: https://github.com/rishi-raj-jain/vue3-layer0-starter
Layer0 Link: https://rishi-raj-jain-vue3-layer0-starter-default.layer0.link/
Vue 2:
GitHub: https://github.com/rishi-raj-jain/vue2-layer0-starter
Layer0 Link: https://rishi-raj-jain-vue2-layer0-starter-default.layer0.link/
Steps taken other than Layer0 Docs (docs do not enable service worker as of now):
P.S. It's been a good learning and my first experience configuring webpack and registering service worker in a non-intuitive manner, after trying hands-on with different config, walking through workbox n vue Github issues (GoogleChrome/workbox#1513, vuejs/vue-cli#5119) and the confusing Vue documentation (https://cli.vuejs.org/core-plugins/pwa.html#example-configuration, while this seems like the instant solution, the service-worker.js is not compiled and is appended as is to the generated service-worker.js by cli-plugin-pwa).