electron-userland / electron-webpack

Scripts and configurations to compile Electron applications using webpack
https://webpack.electron.build/
903 stars 170 forks source link

Recommended migration strategies? #468

Open obra opened 2 years ago

obra commented 2 years ago

electron-webpack does an amazingly good job of hiding the complexity behind putting together a complex Electron app.

Since the project is unmaintained, folks have started sharing alternate boilerplates, tools and stacks they're using to replace it, but what I haven't been able to find is a tool or walkthrough for surfacing the full configurations that electron-webpack currently uses on a given project. With its variety of extension mechanisms and computed configuration files, it's not been all that straightforward for me to figure out what the "vanilla" config files for an existing project would be for webpack, babel, and friends.

Does anyone have recommendations or advice on that front?

loopmode commented 2 years ago

You could provide custom webpack config files for main and renderer, as explained in docs, and in the config files, export a function instead of config object. That function receives the config as first argument, and should return the final config. Now, instead of modifying that - computed - config, you can simply dump it to disc or console output before returning it. That way, you can inspect the full, generated configs for each of the two processes.

VTOxfordNetwork commented 2 years ago

We have built an application using this and I was wondering what people have moved to as a base for building electron apps?

msemtd commented 1 year ago

The recommended was forward is to use electron-forge with the webpack template, e.g.

yarn create electron-app my-new-app --template=webpack