02 React CRA inisde Electron JS desktop app and how to run the production build static files

  Рет қаралды 17,941

Amitav Roy

Amitav Roy

Күн бұрын

#reactjs #javascript #nodejs
0:00 Intro and installing React CRA and running inside Electronjs
1:28 Running the dev build of React inside Electronjs
2:10 Running the prod build of React inside Electronjs
3:40 Open the dev console when the Electronjs app starts
To handle the UI requirement of our desktop app, we would use React. Now, while doing the development, we can use the React CRA localhost URL and do the development. We will get a fast development flow, hot reloading, and all the other niceties of CRA. But, when we want to deploy the desktop app, how do we use the final build?
In this video, we are going to show you just that.
You can find me on:
Code: my-lnk.com/3186169894
Twitter: / amitavroy7​
Discord: / discord

Пікірлер: 26
@Lyzeuph
@Lyzeuph 8 ай бұрын
Finally! Thank you, sir! I wish I would have found your videos sooner!
@amitavroydev
@amitavroydev 8 ай бұрын
Glad to help!
@muhammadaliawan9672
@muhammadaliawan9672 22 күн бұрын
Sir this is super amazing. Tutorial i found on youtube
@amitavroydev
@amitavroydev 22 күн бұрын
Thanks for the feedback 👍
@abhidev488
@abhidev488 Жыл бұрын
Hey thanks for series. And I can see there is no node_modules folder under your app directory how did you do that ? I mean, in my code there is two node_modules folders one in the root and another inside app/
@amitavroydev
@amitavroydev Жыл бұрын
I do have the node_modules folder. I have one config in VS code which hides the node_modules folder from the folder list
@snowin_jj
@snowin_jj 10 ай бұрын
Hey, for some reason the app doesn't works well. I cloned your repo. and installed the dependencies and build the react app and updated the loadURL in main.js. When I ran my app I am seeing a black page. I 've checked the file paths in build index.html file. What are solution I can try? I am using Windows 11.
@amitavroydev
@amitavroydev 10 ай бұрын
Quite possible a node version issue. Why don’t you delete the package lock file and run a fresh install
@GameskoTV
@GameskoTV 8 ай бұрын
Thanks!!! for vite is this export default defineConfig({ plugins: [vue()], base: './' })
@amitavroydev
@amitavroydev 8 ай бұрын
@GameskoTV thanks for the support
@p.p526
@p.p526 8 ай бұрын
WIth Angular it's not working, when we directly use localhost it's working but from dist (similar to build in Angular) it's not working.
@amitavroydev
@amitavroydev 8 ай бұрын
how are you loading the dist files?
@kartikekishore8089
@kartikekishore8089 8 ай бұрын
Can you tell me how to package the app for distribution. I want the user not to see my source code. Maybe an ASAR, I came across electron builder but facing some problem. Can you help me?
@amitavroydev
@amitavroydev 8 ай бұрын
So sorry, even I have not done that yet. My team members have done it. Let me see if I can do that and make a video
@KhaledGhallabPro
@KhaledGhallabPro 9 ай бұрын
I do not use CRA I use Vite instead .. Please help in solving a problem "homepage": ".",
@amitavroydev
@amitavroydev 9 ай бұрын
I haven't used vite outside of the default Laravel setup.
@henriquedelimapessoa6135
@henriquedelimapessoa6135 8 ай бұрын
same problem =(
@GameskoTV
@GameskoTV 8 ай бұрын
export default defineConfig({ plugins: [vue()], base: './' })
@richmondxaviergnanhi8611
@richmondxaviergnanhi8611 Жыл бұрын
next step
@amitavroydev
@amitavroydev Жыл бұрын
Have uploaded the next video. Do check out
@arshu0.720
@arshu0.720 8 ай бұрын
But every time we want build😢
@amitavroydev
@amitavroydev 8 ай бұрын
Why so? First you will do the development and then create the build
@arshu0.720
@arshu0.720 8 ай бұрын
@@amitavroydevno auto loading
@amitavroydev
@amitavroydev 8 ай бұрын
@@arshu0.720 sorry, I am not able to understand your problem
@shubhamchaudhary9468
@shubhamchaudhary9468 6 ай бұрын
When trying to loadFile using "path.join(__dirname, "./electron-react/build/index.html"", it is throwing error "Not allowed to load local resource: file:///C:/[FolderPath]/build/index.html"
@amitavroydev
@amitavroydev 5 ай бұрын
The path doesn’t seem to be correct
ELECTRON: why people HATE it, why devs USE it
17:19
The Linux Experiment
Рет қаралды 181 М.
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 4,4 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 65 МЛН
01 - Setting up an Electronjs desktop app with basic setup
13:28
Creating a desktop app using Electron + React + Tailwindcss
11:52
Reza Builds
Рет қаралды 2,5 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 537 М.
How to integrate React into an Electron App? 🔥
23:14
Atharva Deosthale
Рет қаралды 10 М.
How to create a basic Electron app with Vite and React
12:57
Ehren Grenlund
Рет қаралды 62 М.
Electron with React JS under 40 min!
36:36
Eincode
Рет қаралды 84 М.