electron-userland / electron-webpack

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

Dev version of the dll command #110

Open chapa opened 6 years ago

chapa commented 6 years ago

Hello again,

As mentionned in my previous issue, I can't manage to have a development environment for the dll command (even with NODE_ENV=development webpack-electron dll)

I'm using React and need the development version for some reasons (typechecking with PropTypes, unminified exceptions, ...) I might not run the dll command, so everything is bundled with the webpack-electron dev command, but the compiled renderer.js is so heavy (~9Mo) that it takes about 5sec between I modify a file and the app is hot reloaded. In comparison, with the dll bundle generated, the renderer.js is about 2Mo and the hot reloading is pretty fast.

Do you know if there's any way to run this dll bundle generation with a development environment ?

Thanks by advance ;-)

JM-Mendez commented 6 years ago

For anyone else coming across this, I just discovered you can pass webpack cli commands to electron-webpack according to this line in cli.js

In this particular case where you want to force the environment to development, you can call it like this electron-webpack dll --env.production=false