pdf and png in /src/assets not showing on pwa after applying vite-plugin-pwa #10212
Unanswered
ruud00000
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used vite-pwa-plugin to turn my vue3 app (created with npm create vue@latest) into a PWA.
The serviceworker runs, manifest file is loaded, app is installable. But now when clicking a link that should open a pdf file doesn't do that anymore but instead renders a version of the app without the main section...:
There are no errors in the console indicating the the sources are not available. In fact in DevTools it shows under assets that the pdf file is there.
However before applying the vite-pwa-plugin clicking on that source in the DevTools sources pane would show:
Now it shows the content of the pdf file itself:

What is wrong (or where to start looking) and how to solve?
Edit:
I tried now replacing one of the pdf files by a png file (in /src/assets/) and that gives the same issue, also not displaying the file, and showing the png-content in the DevTools sources pane.
svg files in the same location (for instance the images before 'heren individueel' in the first image in the question above) are still rendered fine however...
Beta Was this translation helpful? Give feedback.
All reactions