Replies: 2 comments 1 reply
-
Well, no. This error is vite failing to build your frontend. The frontendDist config is only relevant after the frontend build succeeded.
This also doesn't really make sense because tauri simply runs the beforeBuildCommand without doing anything special. Can you maybe share your whole vite config? And also the file structure (at least for the html file(s) since it's complaining about it) if possible. |
Beta Was this translation helpful? Give feedback.
-
I just bit the bullet and worked around not having top level asyncs to resolve the issue of needing esnext. It adds complications and makes things a lot more difficult considering i'm making what is essentially a desktop app having a couple of awaits wasn't hurting anything but I've ran out of steam with this. No idea what was causing it. Thanks for your reply |
Beta Was this translation helpful? Give feedback.
-
Hi! I want to ask about this here prior to posting as a bug since its very possible i'm doing something wrong but i can't possibly see what at this point.
I have a tauri app with a vite frontend. It works perfectly fine in dev, and in the past I definitely bundled it to a release exe, though this may have been with tauri v1.
My tauri.conf.json has the following:
When building I get the following error:
(deleted start of paths for privacy reasons)
So its just refusing to accept the parameter ../dist as my folder. I've created a new tauri v2 app in a separate directory and compared the entire projects and see no reason why this would happen.
Furthermore, when I manually copy my dist folder to tauri folder so that the folder is where it expects, the build fails due to browser incompatiblities with chrome etc, however in my vite.config.ts I have already dealt with these build errors with:
Which allows my build to compile perfectly fine with 'yarn build', so it feels like tauri is completely ignoring my vite.config.ts as well.
Structurally all my folder structures, config files and everything match the default skeleton app created from cli, I've cleared out my node_modules and lock files, I've done everything I can think of, I've scoured the net for a similar issue and found nothing.
At the end of my rope I've been bashing my head against this for two days now and in a situation where I'm worried i can't distribute what I'm working on because i can't make a release build.
Beta Was this translation helpful? Give feedback.
All reactions