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

--

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`);

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

atul
atul

Responses (4)

Write a response