- Electron: 13.5.2
- Webpack: 5.70.0
- React: 18.1.0
console.log(__dirname);
I was expecting something like:
C:Users\...\Project\app\settings
But the output:
...\node_modules\electron\dist\resources\electron.asar\renderer
console.log(__dirname);
I was expecting something like:
C:Users\...\Project\app\settings
But the output:
...\node_modules\electron\dist\resources\electron.asar\renderer
First of all __dirname
shows the directory not the file so you shouldn't expect it to show a file.
Second __dirname
shows directory name of the module that is currently run. Electron is starting the process, not your code.