DEV Community

Discussion on: Getting started with Electron and Svelte

personthing profile image
Tim Schottler • Edited on

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!

o_a_e profile image
Johannes Zillmann Author

Thanks @personthing !
Changed the post to use cross-env as more folks were running into this!