electron-userland / electron-userland/electron-webpack
Webpack configuration `optimization.splitChunks.cacheGroups` be overwritten
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
* **Version**: 2.7.4
* **Target**: Windows and MacOS
I am trying to extract the dependencies of my app into a separate `vendor.js` by including an additional configuration for the renderer process. I have successfully overridden the `output.chunkFilename` but not defining a new `cacheGroups` under `optimization.splitChunks`.
I used [`webpack-config-dump-plugin`](https://github.com/n-srg/webpack-config-dump-plugin) to study the merged configuration.
```
...
optimization:
{ nodeEnv: 'production',
minimizer: [ {} ],
minimize: true,
concatenateModules: true,
noEmitOnErrors: true,
splitChunks:
{ cacheGroups: {},
hidePathInfo: true,
chunks: 'async',
minSize: 30000,
minChunks: 1,
maxAsyncRequests: 5,
automaticNameDelimiter: '~',
automaticNameMaxLength: 109,
maxInitialRequests: 3,
name: true },
removeAvailableModules: true,
...
```
The defined `vendor` cache group is not appearing. I believe it is overwritten by the `electron-webpack` internal. Does anyone know how to work around this?
[webpack.renderer.additional.txt](https://github.com/electron-userland/electron-webpack/files/3513328/webpack.renderer.additional.txt)
[webpack.config.dump.txt](https://github.com/electron-userland/electron-webpack/files/3513330/webpack.config.dump.txt)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.