Closed pdkovacs closed 3 years ago
In electron-webpack, your custom config function receives the prepared config object, not an env. You don't call a function with it, but instead return it - modified or not. Webpack gets called then with the result of your function as its config.
Thanks a lot for the quick response!
I followed the instructions here: https://webpack.electron.build/extending-as-a-library . Are these instructions for a package different from electron-webpack
? Or are they for a different context?
I believe it's just a misunderstanding, possibly the docs are not clear enough. But they're essentially correct. The question is whether you want to really use it as a library, and what that means. It would mean that you don't use electron-webpack "on the outside" but "on the inside" instead. The typical use case, yours probably as well, is to use electron-webpack as the build framework, with your app sitting inside of it, being built by it.
Using electron-webpack as a library would mean that your application has the larger setup and infrastructure, and inside of it runs electron-webpack, "as a library".
That is.. maybe I'm leading you in the wrong direction and you actually do want to use it "as a library". The regular use case, what I advised you, is basically https://webpack.electron.build/modifying-webpack-configurations
Thanks a lot for this!
Your assumption is correct (I think), my plan has been to build an application starting with electron-webpack-quick-start
, I don't think I want to use electron-webpack
as a library for now.
N/A
never finishes and stack trace indicates that resolving
electron-webpack/webpack.renderer.config.js
recursively calls the custom webpack configurer: