I usually develop on macOS but I've moved the project over to Windows 10 in order to work on some Windows-specific issues. I use electron-reload to reload the app when changes are made. It's been working wonderfully on macOS but breaks on Windows.
Using the setup below, and npm start to start the app, on Windows it throws an error: "'APP__DEV' is not recognized as an internal or external command"
Am I doing this wrong and macOS is just more "forgiving"? I saw this question: Setting process.env var in package.json and the accepted answer looks the same as what I am doing so I'm confused.
Before I jump down the rabbit hole, I thought I would ask if there is something simple wrong with what I am doing.
If it matters – I didn't do any conversion of CTLF, etc when moving the project to Windows – I just copied it over using DropBox.
package.json
"start": "APP_DEV=true electron .",
Main.js
let isDev = process.env.APP_DEV ? (process.env.APP_DEV.trim() == "true") : false;
if (isDev) {
require('electron-reload')(__dirname);
}