wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
24.06k stars 1.15k forks source link

[v2] Wails with VueJs2 + VueRouter error on navigating #917

Closed nilopaim closed 2 years ago

nilopaim commented 2 years ago

##################################################### If you have a technical issue, please do not open a bug this way! Please use the wails issue command! If you do not do this then the issue may be closed automatically.

NOTE: If your bug is related to Windows, make sure you read the Windows Developer Guide #####################################################

Description I've made an app with Wails and VueJs 2 and VueRouter. Everything works like a charm under normal browser. But when I run via Wails at navigating from one route to other it gaves me a "file not found" on the webview window.

Expected behaviour Navigation on routes should be fine. Instead, when I run via wails dev I receive DEB | [DesktopAssetServer] Loading file from disk: /about.

/about is the route defined in the frontend.

System Details Wails CLI v2.0.0-beta.15 Windows 10 64 bits go version go1.17.2 windows/amd64

leaanthony commented 2 years ago

Using a hashrouter or memoryrouter should work

leaanthony commented 2 years ago

Also check out the vue community templates

nilopaim commented 2 years ago

Using a hashrouter worked perfectly. Nice catch, @leaanthony

I'll make a template with Vue 2 + Vue Router and publish it later.

Wails V2 is fantastic. Congrats.

leaanthony commented 2 years ago

Amazing! Glad you got it sorted and thank you for your support 🙏 I love that templates empower our community! Best of luck!