#Need help with Tauri (Application Dev) - JS

1 messages · Page 1 of 1 (latest)

light frost
#

I am trying to make an app with imports. I have a javascript file that uses the library import without any problem (when I run it using node). I have another javascript file that creates an event on button click. But when I try to merge the two its giving me errors on the import.

#

This file works perfectly fine on it's own:

#

But when I launch tauri app it gives me the import error

jaunty thunder
#

google genai 💀

#

no clue why you're using Tauri if it's all JS anyway (why JS and not TS?)

light frost
#

I got it to work

#

finally

light frost
jaunty thunder
#

It's still shipping a full browser

light frost
#

idk difference between js and ts. I just know that JS is something I am more familliar with

light frost
jaunty thunder
#

I mean plenty of options

#

the question is whether you want cross platform kek

light frost
#

cross plat like OS?

jaunty thunder
#

but TL;DR Tauri doesn't do anything that Electron doesn't (except for "use Rust")

light frost
#

linux n all that

jaunty thunder
light frost
#

I looked at electron as well

#

I just saw electron is less lightweight

jaunty thunder
#

it's the same stuff

#

what was the issue tho

#

did you miss an install?

light frost
#

Its the imports

#

idk how to explain but in short the "web" couldnt reach the import like it normally would while using node

#

so I had to use a bundler or sm shi

#

Like this:

light frost
jaunty thunder
#

you don't have the Rust garbage in your project?

#

Using Tauri makes sense when you plan on shipping Rust code

light frost
#

I didnt rly touch the rust code at all

#

so does that mean I can transfer to electron and just copy-paste the code I already made?

jaunty thunder
#

TL;DR yes (but you also don't gain much except for not having that Rust stuff in your codebase)

light frost
#

I mean if electron is seen as a better name I could just transfer

jaunty thunder
#

It's all the same stuff

light frost
#

I'm sure you can guess which is electron

jaunty thunder
#

😎

#

We hate Rust around here