premiumbad.blogg.se

Build react app
Build react app





build react app

  • mac, win, linux: Platform-specific configurations.īy default, Electron-builder will look for an app icon in /build/icon.png - so you should be good to go as long as you put it in the public directory (Create React App build process will take care of moving it to the build directory).įor more info, see the Electron-builder icons documentation.
  • files: Global of additional files (outside of directories.buildResources) required by the app to run.
  • directories.buildResources: Path of the root dir that holds resources not packed into the app.
  • productName: The name of the app, as shown in the app executable.
  • appId: The application ID used to identify the app in the macOS (as CFBundleIdentifier) and Windows (as App User Model ID).
  • Module to control the application lifecycle and the native browser window. This script controls the main process, which runs in a full Node.js environment and is responsible for managing your app’s lifecycle, displaying native interfaces, performing privileged operations, and managing renderer processes.Įlectron’s main script is often named main.js and stored in /electron/main.js, but in our case, we’ll name it electron.js (to disambiguate it) and store it in /public/electron.js (so that Create React App will automatically copy it in the build directory). The next step is creating Electron’s main script. We’ll use it to wait for the React app to be built before we open the Electron app (while developing).
  • wait-on: Utility to wait for files, ports, sockets, etc.
  • Allows watching and reloading our Electron app.
  • electronmon: Like nodemon, but for the Electron process.
  • electron-builder: A complete solution to package and build a ready for distribution Electron app for macOS, Windows, and Linux.
  • build react app build react app

    electron: The core framework for creating the app.We’ll use it to make our scripts compatible with both Unix and Windows OSes. cross-env: Run scripts that set and use environment variables across different platforms.

    build react app

    We’ll use it to run both the Electron process and the React app in watch mode. concurrently: Run multiple commands concurrently.Yarn add -D concurrently cross-env electron electron-builder electronmon wait-on







    Build react app