Closed christian-schulze closed 12 months ago
Thanks for using Wails and reporting this issue.
This is a duplicate of #2705 and is currently a known issue related due to old Webkit versions not providing the request headers and Vite. You could either use an import instead of a link for the CSS file or you could bump your minimum Webkit2 requirement to 2.36 when building your App. You can find more details here.
Duplicate of #2705
Thanks for the info @stffabi and apologies for duplicate issue. I did do a search but clearly not a good one.
Have confirmed wails dev -tags webkit2_36
works perfectly :+1:
No worries, glad I could help.
Description
The minimum reproduction linked below renders an
<iframe>
referencing a local html file, which is loaded via a custom asset handler. This html file loads a css file via a<link>
tag using a relative path../css/styled.css
.The css file loads correctly in production mode (
wails build
then run app), and in dev mode if you view the app content in a web browser (Google Chrome). It does not load correctly in dev mode within the app.See the screenshot provided below, the response content of the request is javascript and appears to be vite/hot reload related.
To Reproduce
Minimum reproduction available here: https://github.com/christian-schulze/wail-test
Expected behaviour
local css file loaded within
<iframe>
via<link>
tag should load correctly in dev mode within the app.Screenshots
Attempted Fixes
No response
System Details
Additional context
No response