I had one issue setting it up on Windows. Had to change 2 things...
Change the npm script:
"pure-electron-dev": "set NODE_ENV=development && electron ."
And trim() the incoming process.env.NODE_ENV
const mode = process.env.NODE_ENV.trim() ... if (mode === 'development') { // set up watcher }
Very well done article though, thank you!
Thanks @personthing ! Changed the post to use cross-env as more folks were running into this!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I had one issue setting it up on Windows. Had to change 2 things...
Change the npm script:
And trim() the incoming process.env.NODE_ENV
Very well done article though, thank you!
Thanks @personthing !
Changed the post to use cross-env as more folks were running into this!