I have been trying to use __dirname for fs.readFile, but __dirname doesn’t seem to return the proper file path. The path to my plugin repository should look something like
Documents/Obsidian Vault/.obsidian/plugins
But when I console.log(__dirname), it gives me
Applications/obsidian.app/Contents/Resources/electron.asar/renderer
Any idea why it went wrong? Shouldn’t __dirname point to the path of my current code file?