

Here’s the code for steps 3 and 4: const electron = require('electron') Steps 1 and 2 are pretty straightforward.

#ELECTRON APP ICON GENERATOR HOW TO#
But for an ejected application, you would have to either forgo these improvements or figure out how to apply them.Īn ejected configuration is over 550 lines spanning 7 files (as of this post). There have been 49 releases (as of this post) of create-react-app, each making improvements. Ejecting an application copies all the encapsulated configuration of create-react-app to the your project, providing a boilerplate configuration that you can change as you wish.īut this is a one way trip. If these assumptions aren’t for you, there is an option to eject an application ( npm run eject). What is ejecting, and why do you want to avoid it?Ĭreate-react-app makes certain assumptions about a typical React setup. It hides most of the configuration and lets the developer use simple commands, such as npm start and npm run build to run and build their apps. The configuration overhead varies (more on this later), and there are many boilerplate and application generators available, but in July 2016 Facebook Incubator released a tool, create-react-app. webpack is a configuration and build tool that most of the React community has adopted over alternatives like Gulp and Grunt. Most use webpack for the configuration necessary for React development. React is Facebook’s JavaScript view framework.Ī JavaScript library for building user interfaces - ReactĪ JavaScript library for building user Īnd Electron is GitHub’s framework for building cross-platform desktop apps in JavaScript.īuild cross platform desktop apps with JavaScript, HTML, and Here’s the GitHub repo for my app.īefore we get started, let me tell you about Electron and React, and why create-react-app is such a great tool. If you’re feeling impatient, you can dive right in and look at my code. But my search for existing guides for using Electron and create-react-app together didn’t bear any fruit, so I just dove in and figured it out myself. I was drawn to the idea of using create-react-app because it hides the webpack configuration details. I’ll walk you through how I accomplished this. I didn’t need to muck about with Webpack, or “eject” my app, either. I recently built an Electron app using create-react-app. No webpack configuration or “ejecting” necessary.
