wails: [v2] Not found error in production
Description
Assets cannot be found in production build but can be in wails dev.
To Reproduce
In index.html, I placed a simple tag linking to home.html. I then created home.html in the same directory with random text.
In production, index.html loads. However, when going to the href, it returns Not found
This problem does not exist on wails dev
Expected behaviour
Load and show file
Screenshots

Attempted Fixes
Using javascript window.location.href = and putting files in different directories.
System Details
System
------
OS: Ubuntu
Version: 22.04
ID: ubuntu
Go Version: go1.18.4
Platform: linux
Architecture: amd64
Wails
------
Version: v2.0.0-beta.38
Revision: 764dadc8f44ea47107ca4d91d1df11db6b58bb48
Modified: true
Package Manager: apt
Dependency Package Name Status Version
---------- ------------ ------ -------
*docker docker.io Installed 20.10.17
gcc build-essential Installed 12.9ubuntu3
libgtk-3 libgtk-3-dev Installed 3.24.33-1ubuntu2
libwebkit libwebkit2gtk-4.0-dev Installed 2.36.3-0ubuntu0.22.04.1
npm npm Installed 8.5.1~ds-1
*nsis nsis Available 3.08-2
pkg-config pkg-config Installed 0.29.2-1ubuntu3
Additional context
Using bugfix/linux_scaling_issues branch. Latest commits pulled and merged
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (15 by maintainers)
It seems that a
vite.config.jsfile is needed to declarehtmlfiles. CSS, JS, and images are the only ones automatically loaded by vite.