Open rafaelragib opened 3 months ago
Dont change web manifest and sw location, the sw scope cannot be outside the subfolder (you will need to add service-worker-allowed: /
http header or similar). The icons can be in any subfolder.
all of the files (nuxt script, icons, assets) are in the subdirectory file. I don't think it will be an issue to serve it from the subdirectory.
The .output/public
folder is your app's root context, Vite/Nuxt will copy your public folder assets to that folder (preserving subfolders structure): the sw is under subdirectory
path. The sw.js request is <base>/subdirectory/sw.js
, the browser will prevent that sw to be installed with scope <base>
Greetings,
Firstly, I want to express my gratitude for the outstanding plugin you've developed. It has greatly enhanced my project's functionality.
Issue Overview:
I've encountered a challenge while utilizing the vite-pwa nuxt 3 plugin within my project. In my project's public folder, I have a subdirectory designated for displaying various assets. However, my reverse proxy setup is configured to deny access to all other subdirectories except this designated one. Upon running the Nuxt build process, the plugin generates the following output structure:
While I've successfully managed to configure the service worker (
sw.js
) and the Workbox file (workbox.js
) to be served from the subdirectory by incorporating the following configuration innuxt.config.js
:However, the challenge arises when attempting to automatically generate the
manifest.webmanifest
file within the subdirectory during the manifest generation process facilitated by the plugin. I am unable to locate any configuration options within the plugin's documentation that would allow me to specify the output directory for the manifest file. Any sort of guidance or assistance in resolving this issue would be really helpful.