pub fn parse(
target: Target,
path: impl Into<PathBuf>,
) -> Result<(Config, PathBuf), ConfigError>
Expand description
Parse the config from path, including alternative formats.
Hierarchy:
- Check if
tauri.conf.json
exists a. Parse it withserde_json
b. Parse it withjson5
ifserde_json
fails c. Return originalserde_json
error if all above steps failed - Check if
tauri.conf.json5
exists a. Parse it withjson5
b. Return error if all above steps failed - Check if
Tauri.json
exists a. Parse it withtoml
b. Return error if all above steps failed - Return error if all above steps failed