#Why do I need to resolve resource if hardcoded paths work after build?

3 messages · Page 1 of 1 (latest)

echo viper
#

I created resources folder inside src-tauri next to tauri.conf.json and included it by adding "resources": ["resources/**/*"] in config under bundle key, and it works in release build and even after installing app using nsis without handle.resolve() just by specifying full path on rust side for ex: resources/templates/image.png, so Im a bit confused in what case it might not work, why do I need to complicate thing with PathResolver (I'll need to pass app_handle to my custom struct)?

waxen widget
#
  1. platform differences - this wouldn't work on linux/macos
  2. new bundle types may use different paths
  3. technically there's no stability guarantee and we could change the paths. very unlikely though since we know that people depend on it.
#

so yeah, if you only need windows support it's fine 🤷