

Get started fast with electron-webpack-quick-start. I am building a typescript/javascript package that will contain several JSON files. Add-ons to support items like TypeScript, Less, EJS, etc.Ability to add custom webpack loaders, plugins, etc.Use of that is automatically configured based on your electron version.HMR for both renderer and main processes.Use of webpack-dev-server for development.Use of webpack for source code bundling.Here are some of the awesome features you’ll find using electron-webpack: Sure a full featured boilerplate works too, but doing also involves needing to manually update those pesky webpack configuration files that some may call magic when something new comes out. Putting all development scripts into a single updatable module just makes sense. If you’ve been in the JavaScript world for even a short period of time, you are very aware that things are always changing, and development setup is no exclusion. In the next post, Ill walk you through the steps required to package and build a ready for distribution Electron application with 'auto update' support using electron-builder.

After that, we have to put a script tag inside our main view file. For the main process, just type rs in the console you launched electron-forge from and we will restart your app for you with the new main process code. Now inside your main server file In my case I have server.js Inside this file, we have to require livereload package and then reload (yourservervar) function. However, Webpack is constantly watching and recompiling those files so to get updates for preload scripts simply reload the window.
Webpack electron livereload install#
Fire up the terminal and run npm install livereload. Why create a module and not a full boilerplate? To do this we are going to use livereload package. The primary aim of electron-webpack is to eliminate all preliminary setup with one simple install so you can get back to developing your application. Unfortunately when creating electron applications, all of that setup just became much more difficult. Modern web development practices today require a lot of setup with things like webpack to bundle your code, babel for transpiling, eslint for linting, and so much more that the list just goes on. The Webpack plugin allows you to use standard Webpack tooling to compile both.
Webpack electron livereload how to#
Because setting up webpack in the electron environment shouldn’t be difficult. How to configure Webpack with Electron Forge using its first-party plugin.
