Closed gynt closed 1 month ago
I solved it. This line of code was causing the issue:
if (import.meta.env.DEV) {
await import('../function/dev');
}
The code would set some functions in the globalThis.dev
variable.
The only issue remaining is, when did this stop working? We think it is because of a new Webview2 release by Microsoft, but we can't tell.
Turns out, it is the await
in this code that is causing issues. Still not sure why that is suddenly an issue.
Describe the bug
When I run
npm run dev
, all files are loaded, e.g. CSS, .tsx files, so I get my background color. However, no html elements are rendered at all:main.tsx
isn't run?. This same identical setup used to work 3 days ago. I received a Webview2 update from Windows yesterday and then it stopped working I think. There are no errors in the web console. Interestingly, release builds work just fine. The repo is here: https://github.com/UnofficialCrusaderPatch/UCP3-GUIReproduction
UPDATE: Use a global scope
await import()
in your code (for importing development functionality).Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response