I'm working on the demo electron-quick-start project. I just added, in the main folder, a test.txt file and this in index.html :
<script>
const fs = require('fs');
alert(fs.readFileSync('test.txt')); // or ./test.txt or .\test.txt
</script>
It works. But now after having packaged the app with :
electron-packager . --platform=win32 --arch=ia32
when I run the packaged .exe app, it doesn't find the test.txt.
Probably because the test.txt is not in the same folder than the .exe but rather in resouces/app/test.txt.
What's the clean way to solve this electron-packager folder issue?