Home > other >  How can I set up electron-builder.js in my project's directory?
How can I set up electron-builder.js in my project's directory?

Time:07-22

my project's structure image

I am trying to make a project using electron and react.

All settings related to execution are done in package.json. The code I've written displays just fine.

However, there is a problem in the process of building my code into an application through electron-builder.

I've looked at a lot of documentation on the internet, but I couldn't find a detailed article on the many options of builder, or most of them I couldn't understand. How can I configure electron-builder.js in the structure of my project?

The build script in package.json should do two things. The first thing to do is to bundle my react project through webpack and save it in the build/react directory, and merge the file that I just bundled through electron-builder (I guess this bundled file is a renderer) and electron's main process.

The second thing is to save the installable file in dist directory through the process (sorry, I don't know how to express it).

Up to the stage of bundling the React project went smoothly, but I am stuck at the second stage because I could not configure electron builder correctly.

I think need to setting the appropriate options in the builder's option fields -> files field.

Any help would be greatly appreciated

  • Related