replit / desktop

Replit Desktop App
116 stars 7 forks source link

Use different store in dev and in prod #116

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

I find it annoying developing the app that we use the same store for dev (incl in local and staging modes) as well as in prod. This leads to issues like the app trying to open a repl that doesn't exist (e.g. when switching from dev to prod and vice versa). See relevant docs: https://github.com/sindresorhus/electron-store#name

What changed

Use different store in dev (and the diff dev modes like start:local and start:staging) and in prod. Also switching to using enum here since that's a bit more fitting

Test plan

Open each one, resize window in each, should see window pos/bounds be persisted only for that version (e.g. local, staging, prod).