![]() Using, a default project, you will be able to implement this on your main.js file once the electron module has been required. Here, after a file changes, it will trigger a live reload to your content. All you need to do is to place the electron-reload module in the pathway of the folder for your project. If you are not really modifying the JavaScript that takes of Electron tasks but only your code (frontend), implementing a live reload for your content is going to be enough. Step 3: Launch Live Reload for your Content.If you already have an electron installed within you could simply implement a specific set of commands in your main.js file. For example if you want to do a hard reset (that is starting a fresh electron process), you can simply pass the path to electron executable in options object. Step 2: Launch Live Reload for Electron and ContentĪnother phase in the process is to launch live reload for content.To install the module in your project, you have to switch with your terminal into the directory of your project before executing a specific set of commands. This automatically implements the live reloading feature in your Electron project. Electron Reload is arguably the simplest way for you to load contents of your active Browser Windows in electron whenever the source files undergoes changes. Install Electron Reload is one way to use live reload in your Electron project. Take an example, if you are using a dynamic navigation element with JavaScript and you decide to change your JS code, implementing live reloading will restart the application and load it back to the item on your navigation. The purpose of live reloading is to reload or refresh the entire app with file changes. Even though hot reloading isn’t yet available for Electron, it is still possible to implement the live reloading feature with an open source module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |