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

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 39

  • @Lyzeuph
    @Lyzeuph ปีที่แล้ว

    Finally! Thank you, sir! I wish I would have found your videos sooner!

  • @muhammadaliawan9672
    @muhammadaliawan9672 5 หลายเดือนก่อน +1

    Sir this is super amazing. Tutorial i found on youtube

    • @amitavroydev
      @amitavroydev  5 หลายเดือนก่อน

      Thanks for the feedback 👍

  • @GameskoTV
    @GameskoTV ปีที่แล้ว +3

    Thanks!!! for vite is this
    export default defineConfig({
    plugins: [vue()],
    base: './'
    })

    • @amitavroydev
      @amitavroydev  ปีที่แล้ว +1

      @GameskoTV thanks for the support

  • @snowin_jj
    @snowin_jj ปีที่แล้ว +1

    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  ปีที่แล้ว

      Quite possible a node version issue. Why don’t you delete the package lock file and run a fresh install

  • @abhidev488
    @abhidev488 ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      I do have the node_modules folder. I have one config in VS code which hides the node_modules folder from the folder list

  • @CodeWithMuhammadAhsan
    @CodeWithMuhammadAhsan 3 หลายเดือนก่อน

    perfect everything works on my pc too

  • @muhammadayyazanjum2130
    @muhammadayyazanjum2130 3 หลายเดือนก่อน

    do i need to run the command npm run build again again once i make a change is there any other way

  • @p.p526
    @p.p526 ปีที่แล้ว

    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  ปีที่แล้ว

      how are you loading the dist files?

  • @kartikekishore8089
    @kartikekishore8089 ปีที่แล้ว

    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  ปีที่แล้ว

      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

  • @ahmedmhmouad7231
    @ahmedmhmouad7231 3 หลายเดือนก่อน

    how can i make changes in front end show automatically without rebuild it each time

    • @amitavroydev
      @amitavroydev  หลายเดือนก่อน

      You can run it on a server and use that as the URL

  • @KhaledGhallabPro
    @KhaledGhallabPro ปีที่แล้ว

    I do not use CRA I use Vite instead .. Please help in solving a problem "homepage": ".",

    • @amitavroydev
      @amitavroydev  ปีที่แล้ว

      I haven't used vite outside of the default Laravel setup.

    • @henriquedelimapessoa6135
      @henriquedelimapessoa6135 ปีที่แล้ว

      same problem =(

    • @GameskoTV
      @GameskoTV ปีที่แล้ว +2

      export default defineConfig({
      plugins: [vue()],
      base: './'
      })

  • @harshmittal63
    @harshmittal63 4 หลายเดือนก่อน

  • @arshu0.720
    @arshu0.720 ปีที่แล้ว +1

    But every time we want build😢

    • @amitavroydev
      @amitavroydev  ปีที่แล้ว

      Why so? First you will do the development and then create the build

    • @arshu0.720
      @arshu0.720 ปีที่แล้ว

      @@amitavroydevno auto loading

    • @amitavroydev
      @amitavroydev  ปีที่แล้ว

      @@arshu0.720 sorry, I am not able to understand your problem

    • @francislainycampos2035
      @francislainycampos2035 2 หลายเดือนก่อน

      @@amitavroydev I think the question is how to get back to the behaviour we had when the page was loading the changes automatically so that we don't need to keep running the build command to see those changes.

  • @richmondxaviergnanhi8611
    @richmondxaviergnanhi8611 ปีที่แล้ว +1

    next step

    • @amitavroydev
      @amitavroydev  ปีที่แล้ว

      Have uploaded the next video. Do check out

  • @shubhamchaudhary9468
    @shubhamchaudhary9468 10 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      The path doesn’t seem to be correct

  • @2005bgva
    @2005bgva 3 หลายเดือนก่อน +1

    Advise: For Vite users, it is not necesary to add "homepage": "." to package.json. Instead add "base: './'," to "vite.config.ts"

    • @amitavroydev
      @amitavroydev  3 หลายเดือนก่อน +1

      Okay, thanks for the information

  • @CodeWithMuhammadAhsan
    @CodeWithMuhammadAhsan 3 หลายเดือนก่อน

    amazing,