vite-plugin-pwa
vite-plugin-pwa copied to clipboard
Unable to have `devOptions.enabled` set to `true` working on Laravel
Hi,
Currently I'm working on a laravel project and so far everything's working just fine except one thing, I want to have this plugin to work on development but unable to make it happen due to the /dev-sw.js
file is refer to APP_URL
instead of vite dev URL.
SW registration failed: TypeError: Failed to register a ServiceWorker for scope ('https://skeleton.creasi.local/') with script ('https://skeleton.creasi.local/dev-sw.js?dev-sw'): A bad HTTP response code (404) was received when fetching the script.
But when I try to access the dev-sw.js
using vite dev URL (https://skeleton.creasi.local:5173/dev-sw.js?dev-sw
).
Is it possible to load the dev-sw
using vite dev URL?
The same issue occurs with the web manifest file. It appears that the generated URLs do not include the server port.