Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

How do you bundle config files when building with Tauri + Svelte?

$
0
0

I want to make the config.json file of my Tauri app available for users so that they can modify its properties on the fly like you would with a .net app. For example, users might want to change the exported file save location.

The Tauri documentation states that I should add the path to the resources tag in the tauri.conf.json file to include the file in the application bundle:

"resources": ["../public/config.json"]

But this won't work because the documentation also says:

Absolute paths and paths containing parent components (../) can only be allowed via "$RESOURCE/*". Relative paths like "path/to/file.txt" can be allowed explicitly via "$RESOURCE/path/to/file.txt".

Unfortunately, I don't understand what that means. I've tried this and this doesn't work either:

"resources": ["$RESOURCE/public/config.json"],

to be clear, the tauri.conf.json file is in the src-tauri folder and the config file I want to bundle is in the public folder.

What is the correct way to provide editable json config files to users using tauri and how do I make it work?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>