I want to import my config.json file directly into the vuex store and use it dynamically if it changes without using all the time readTextFile as a mutation call.
Like this for example:
import { writeTextFile, BaseDirectory } from "@tauri-apps/api/fs";
import configpath from `$(BaseDirectory.App)/config.json`
export default {
state: {
path: configpath,
},
}
// or alternative
export default {
state: {
path: `$(BaseDirectory.App)/config.json`,
},
}
But BaseDirectory.App returns 18 instead of a file path. How I can extract the file path out of it or is there a better option? 😅