kevinmarrec / nuxt-pwa-module

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

fix: Non-relative paths are not allowed when 'baseUrl' is not set #108

Closed Quineone closed 9 months ago

jake-danton commented 9 months ago

Testing this locally, it didn't work. But the following worked for me:

  function relativeWithDot(from: string, to: string) {
     return relative(from, to).replace(/(^.[^/])/, "./$1");
   }

See #109 for other changes needed get it working with latest Nuxt