I've got an electron app with vite/xstate/react. In development I'm seeing just a single xstate.init
event emitted when starting up the app. But in production builds, I see two xstate.init
events (there should only be one, triggered by xstate itself upon initialising):
I'm logging the event out (renderer process, so it shows up in dev tools). It comes from the same file/chunk, but for some reason, dev tools show two different paths to the same file (file:///Users/...
vs /Users/...
). This is causing some bad bugs where things get ran twice in some cases. I'm trying to narrow down the issue here. Is this some sort of issue with electron and the build files?