laravel-pwa icon indicating copy to clipboard operation
laravel-pwa copied to clipboard

Laravel and vuejs

Open sanaderi opened this issue 4 years ago • 4 comments

Is possible use this package with laravel and vuejs? I try use that in my vue/laravel project but dont work

sanaderi avatar Aug 03 '20 14:08 sanaderi

What's the issue?

CirkaN avatar Aug 07 '20 04:08 CirkaN

@sanaderi you might need to change the paths in the serviceworker.js file?

leganz avatar Aug 21 '20 09:08 leganz

I´m also trying to implement this package on a Laravel 8.31.0 using Vue 3.07, but the serviceworker never runs. I´ve track the issue to this line on the script @ app.blade.php:

if ('serviceWorker' in navigator) {
                    navigator.serviceWorker.register('/serviceworker.js', {
                        scope: '.' ...

but if I console.log(navigator), it doesn´t have a 'serviceworker' key or attribute and there´s no else{} clause to this if(), so the serviceworker.js file never gets called. Any suggestions will be very valuable. Txs!

Edit: Nevermind, it only happens in local environment. It´s loaded fine in production.

archmaster01 avatar Mar 06 '21 19:03 archmaster01

I think one requirement for service worker is a valid https connection... you might use expose to achieve this on local machines

leganz avatar Mar 06 '21 22:03 leganz