Skip to content

🌱🌐+πŸ’» A minimal example of a webpack that builds to both web and electron targets.

Notifications You must be signed in to change notification settings

good-lly/webpack-web-and-electron-example

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Getting Started

yarn everything first!

then you have these commands:

yarn web:dev - development version of the webapp, at http://localhost:8080 if run before/without electron command yarn electron:dev - development version of the electron app

these two can be run side by side, or you can just run

yarn all:dev - runs both of the above commands in parallel, with web at http://localhost:8081

What next?

If you are looking for a starter kit, there are many excellent electron boilerplates that could be customized for this purpose. With electron, you want to have your development and release toolchain down pat. Don't sacrafice having that just because your boilerplate doesn't have this one specific feature (building to a web target).

Next episode I will recreate this using webpack-electron, and show some patterns you can use for conditionally loading electron-renderer specific dependencies.

About

🌱🌐+πŸ’» A minimal example of a webpack that builds to both web and electron targets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.0%
  • HTML 4.0%