-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Javascript Logical OR operator throws SyntaxError #10829
Comments
I'm not the most familiar with mac but from your system information, |
I don't quite understand yet, does this mean Tauri/Wry uses the webkit version that comes with my macOS version. Resulting to the issue since Is there a possible work-around on this issue or I am stuck? I've been hoping to build cross platform apps using tauri... Maybe I can run a script that changes a specific code on sveltekit package before running tauri dev/build? I have no longer any capabilities to update my device so getting updates on Safari is out of the picture. |
Tauri uses the webview (in this case webkit on macos) provided by the OS, for your case, you can try changing |
I got the build release working after adding es2020 as build target but |
Try |
Tried it, no transformation happens during dev start, the |
Some people suggested using |
I'm closing this for now since it's not really a problem that tauri can fix, feel free to keep the conversation going though |
Describe the bug
Trying out Tauri 2.x RC with sveltekit 2.x and it seems failing to recognize Logical OR
||=
operator in JavaScript.This is the exact line of code in sveltekit repo that throws an error when running
pnpm tauri dev
:https://github.com/sveltejs/kit/blob/45cb8c5f305b4d9e61a32e19af8059dc0da4c255/packages/kit/src/runtime/client/client.js#L305
According to the author, it is valid JavaScript:
sveltejs/kit#12040
As seen on MDN docs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR_assignment
I have another tauri project that uses sveltekit 1.x, they have
pending_invalidate = pending_invalidate || Promise.resolve();
in it but in 2.x they changed it toawait (pending_invalidate ||= Promise.resolve());
.Not sure whether the issue is with tauri, wry or tao, it would be nice if someone can help.
Reproduction
https://github.com/lnfel/tauri2.xrc-svelte5
Expected behavior
Expected the JavaScript logical OR operator
||=
to be a valid syntax.Full
tauri info
outputStack trace
The text was updated successfully, but these errors were encountered: