import { app } from 'electron' ; import path from 'path' ; import { bundleId , name } from '../../../../package.json' ; const prod = process . env . NODE_ENV === 'production' ; app . setAppUserModelId ( bundleId ) ; const appDataPath = app . getPath ( 'appData' ) ; const userDataPath = path . join ( appDataPath , prod ? name : name ) ; app . setPath ( 'userData' , userDataPath ) ;