Electron app showing white screen after successful build but work in development mode

atul
1 min readOct 11, 2019

This problem is due to wrong link between build folder & entry point of your app

DON’T USE in this way

mainWindow.loadURL(isDev ? ‘http://localhost:3000' : `file://${path.join(__dirname, ‘../build/index.html’)}`);

USE IN THIS WAY

mainWindow.loadURL(isDev ? ‘http://localhost:3000' : `file://${__dirname}/../build/index.html`);

--

--