kevinmarrec / nuxt-pwa-module

⚠️ DEPRECATED ⚠️ Zero config PWA solution for Nuxt 3
MIT License
334 stars 32 forks source link

feat: add runtime config support for swUrl #73

Closed BobbieGoede closed 1 year ago

BobbieGoede commented 1 year ago

My attempt at fixing my issue described in #72

This makes it possible to change the swUrl and add query parameters by setting it in runtimeConfig like so:

runtimeConfig: {
    pwa: {
        workbox: {
            swUrl: `/sw.js?${queryParams}`
        }
    }
}

This may not be an optimal solution but it works, please let me know if a different approach is preferred.

kevinmarrec commented 1 year ago

Hi @BobbieGoede , thanks for the PR ! I'll have the review done soon, sorry for the delay.

kevinmarrec commented 1 year ago

Closing following #72