Electron-forge: Using webpack with electron-forge v5

Created on 30 Jul 2018  路  8Comments  路  Source: electron-userland/electron-forge

Hi, anyone knows how to run webpack with electron-forge version 5? I started a project in that version and now I want to use some features of webpack like code splitting to dinamically load some modules.
Thanks!

Most helpful comment

Why are you using both electron-compile and webpack? That seems like a bad idea.

All 8 comments

It would be more helpful if we had more users testing the built-in webpack support in v6. That will help us get it to stable faster.

Okay but what about electron-compile that, according to the docs of the v6 plugins, "If you need Electron Compile support we advise you remain on Electron Forge <= 5".
Any workaround?
Also we have a project under development that we are launching to prod in the next weeks and we need some stability..

Why are you using both electron-compile and webpack? That seems like a bad idea.

@locolauty97 : Re: electron-compile on v6 it seems to work fine now. the compile plugin wasn't even in the the main repo yet when that note was written.

@malept : I was waiting for someone to come up with a config for plugin-webpack that was equivalent to what you get from electron-compile before trying it. I don't have the patience or time to both learn and try to setup webpack myself. That's why I used electron-compile in the first place.

Using electron-compile is already a bad idea.
@locolauty97 It compiles files in runtime and doesn't produce static output AFAIK.
You'd better use webpack without hot-reload on electron-forge now. (It doesn't mean that you can't do hot-reload, just saying.)

@vintproykt

@locolauty97 It compiles files in runtime and doesn't produce static output AFAIK.

This is incorrect, in development it compiles at runtime. In production everything is pre-compiled into static output.

@vintproykt : until you wanna write that webpack file for me it's electron-compile until then. I need support for typescript, sass, react, and maybe vue. I'll be expecting it soon :)

Gonna close this out, if you want webpack use v6 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

denn-s picture denn-s  路  3Comments

liamdawson picture liamdawson  路  4Comments

mistermicheels picture mistermicheels  路  4Comments

Skizu picture Skizu  路  5Comments

partheseas picture partheseas  路  3Comments