forge
forge copied to clipboard
Can't set webpack config of preload file
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.1.1
Electron version
17.4.11
Operating system
Window 10 (19045)
Last known working Electron Forge version
unkonw
Expected behavior
Preload js should wrap by webpack.
Actual behavior
Not do the expected behavior.
Steps to reproduce
renderer: {
config: rendererConfig,
entryPoints: [
{
js: './src/main.ts',
name: 'main',
preload: {
js: './electron/preload.js',
config: {
entry: "./electron/preload.js",
output: {
path: path.resolve(__dirname, ".webpack/main"),
filename: '[name].js',
},
resolve: {
extensions: [".js"],
}
},
},
},
],
},
I'm sure that main and renderer webpack output not clean up work directory.
Additional information
No response
Hello, is there any one who have the same problem?
Yes, I have the same problem. I need to have separate webpack configs for renderer and preload scripts. Renderer webpack config include frontend framework plugins, that are not needed in preload script.