Getting The Root Path of an Electron Application

Calling the rootPath function

If you wound up here somehow, you are no doubt confused about how to get the root directory of an Electron app. It’s surprisingly complicated depending on the environmental setup. The path works a little differently in development mode than it does in a fully packaged application in an asar archive. If you’re having trouble, make sure you test both scenarios.

Read More