Skip to content

Instantly share code, notes, and snippets.

@deepak
Last active January 31, 2017 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepak/d564b330b4682d6064ebde505088b070 to your computer and use it in GitHub Desktop.
Save deepak/d564b330b4682d6064ebde505088b070 to your computer and use it in GitHub Desktop.
webpack vs electron-forge
karl.jakober [7:13 AM]
looking for a good alternative to webview.ContentWindow.postMessage for electron, people are saying webview.send is a good alternative, but that requires ipc to be invoked inside the webview itself
marshallofsound [7:51 AM]
There are a few reasons people use `webpack`
1. Bundling commonjs deps for web usage
2. HMR
3. A fast dev flow (rebuilding and watching)
4. Adds support for things like LESS through loaders
These are counteracted during Electron development like so
1. Electron supports a full commonjs environment, you don't need to bundle
2. HMR --> This is missing from Electron dev flows, it's something I keep coming back to every now and again
3. With `-forge` you simply reload and everything that needs to gets "rebuilt", you don't even realize stuff is being built
4. `-forge` has built in support for a whole bunch of syntax's such as LESS, Typescript, ES6/7, Vue templates and so on
The only major thing missing that you get from webpack is HMR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment