import * as path from 'path' ; const appIsPackaged = ! process . defaultApp ; see https see https export const staticPath = appIsPackaged ? __dirname . replace ( /app\.asar$/ , 'static' ) : path . join ( process . cwd ( ) , 'static' ) ;