Can't access files in public folder in packaged app, all works in dev mode #16750
Unanswered
RobsonMi
asked this question in
CLI - Electron mode
Replies: 1 comment
-
Only solution to this issue I found is conditional path which looks terrible :( I had to use: This is clearly some Vite packaging issue but I lack the expertise to identify the issue. Hope someone else can solve this with my findings ;) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
When Quasar Electron project is build and packaged all files from public are unavailable in asar.
To reproduce this I created new blank project using Quasar CLI with Vite, added Electron support and moved
quasar-logo-vertival.svg
fromsrc/assets
topublic
and updated path from~assets/quasar-logo-vertical.svg
to/quasar-logo-vertical.svg
.Such configuration works in every dev mode (SPA and Electron) but when build is done it only works in SPA and fails in Electron app (404 file not found).
Am I missing something? Should I somehow force addition of public folder to asar?
EDIT 1:
I managed to "fix" this behavior by changing
/quasar-logo-vertical.svg
to justquasar-logo-vertical.svg
but then it's not found when router is in history mode and particular route has some parameters in it like for instanceanother/:id
. Then it will look for svg file as appended to current URL with full route in it. It would be best to have some way to get the normal/
way to work in build electron app.Beta Was this translation helpful? Give feedback.
All reactions