vuejs / vue-router

🚦 The official router for Vue 2
http://v3.router.vuejs.org/
MIT License
18.99k stars 5.06k forks source link

Loading Css chunk failed #3813

Closed pokecheater closed 1 year ago

pokecheater commented 1 year ago

Version

3.5.3

Steps to reproduce

If I open a specific link in an builded electron application from another sub path this error occurs. For example: I router.push(/"architectures/"+id) but I am already located at "/projects/123". If I do router.push("/architeectures/"+id) from the route "architectures" or from root everything works fine. I would love to send a screen shot but this form does not allow it. So here copy and pasted the error:

vue-router.mjs:2316 Error: Loading CSS chunk 654 failed. (app://./projects/css/654.27589a38.css) at HTMLLinkElement.o (css loading:14)

I know that the issue lies in the reason that electron tries to reload it from the ./projects/ folder which is wrong. It should be the root folder. Any ideas?

What is expected?

That it load correctly.

What is actually happening?

See error below.

pokecheater commented 1 year ago

Just in case anybody else facing this issue and no appropriate solution was found until then. I found a workaround that works for me (but I do not like it since I need always redirect to the app root first, but the user will not recognize it).

image

Hope there is an official solution to this problem, anyways with the workaround the app behaves as expected.

posva commented 1 year ago

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.