electron-userland / electron-userland/electron-webpack
Electron-webpack not working with webpack5
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
I am using these dev dependencies as a starter project.
```
"electron": "^10.1.5",
"electron-webpack": "^2.8.2",
"webpack": "^5.2.0"
```
But the electron-webpack seems to be incompatible with the breaking change from webpack 5. I looked at [webpack docs](https://webpack.js.org/migrate/5/#update-outdated-options), it says namedImports are removed in v5. I tried changing `optimization.namedModules: true ↦ optimization.moduleIds: 'named'`
in [forked repository](https://github.com/shahkeyur/electron-webpack) and I can confirm it works on development, but not sure how to make it compatible with v4 and v5 at same time. Is there anyway it can be solved ? Then I can create a pull request.
```
┏ Renderer -------------------
× 「wds」: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.optimization has an unknown property 'namedModules'. These properties are valid:
object { checkWasmTypes?, chunkIds?, concatenateModules?, emitOnErrors?, flagIncludedChunks?, innerGraph?, mangleExports?, mangleWasmImports?, mergeDuplicateChunks?, minimize?, minimizer?, moduleIds?, noEmitOnErrors?, nodeEnv?, portableRecords?, providedExports?, realContentHash?, removeAvailableModules?, removeEmptyChunks?, runtimeChunk?, sideEffects?, splitChunks?, usedExports? }
-> Enables/Disables integrated optimizations.
Did you mean optimization.moduleIds: "named" (BREAKING CHANGE since webpack 5)?
┗ ----------------------------
```
Thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.