how to create production build for react electron app.? - reactjs

I'm using creating react + electron weather app but I can't be creating a production build for that.
I am using the electron-packager for creating build but this is not working

Related

How do I properly set up a React app using Vite with my Django backend?

I've built my Django backend, then created a new app called Frontend. In the frontend folder I started a Vite app called "static" which includes my src folder and other files. When I create a build using npm run build a dist folder is created. I am able to run this project on localhost:5173 but when I want to run on Django (http://127.0.0.1:8000/) I get a blank white screen with errors.
The errors are linked -->
Has anyone gone through this process?

Trying to make build of Electron using "electron-build", but not generating

I'm trying to make build of my electron app using electron-builder but it is building for development only not for production, can anyone guide me how to make a production build?

Deploying a Reactjs application (CRA) on heroku throws an error

Following is the error I am getting. The front-end of the application is built using CRA. And the backend is built with Laravel - Laravel Sanctum and Laravel Fortify. I am using craco for building the app.
Error: React Refresh runtime should not be included in the production bundle.
I found the issue. Heroku was building the react app using nodejs buildpack. In order to deploy a react project scaffolded using create-react-app a buildpack other than "heroku/nodejs" needs to be used. In my case I used this buildpack -> https://github.com/mars/create-react-app-buildpack.git. And finally using this I got the app to working.
Thank you #mando for you help.

How to build react app for production without making the website offline?

Is it possible to build react app for production using npm run build without it making the site offline? I am using nginx to serve the react app and when I run the above command, I get Internal server error until the build is finished. It would be nice if the old version of the app is served until the build is finished.
You shouldn't be building your application on the production server. Build it locally, then deploy it to production and this won't be an issue.

Deploy reactjs by electron for creating desktop app

I know my question is obvious but I want to find best practice for that. How can we deploy a reactjs project by electron in lowest size of package? Can we deploy the built reactjs project by electron? I use create-react-app and I don't want to eject that.

Resources