@expo/electron-adapter uses Webpack v4 configuration options which were dropped/removed since v5.
Hence expo-electron doesn't support webpack v5 right now.
Expected Behavior
Application using webpack v5 should run with @expo/electron-adapter, using expo-electron start command
Observed Behavior
After running expo-electron start, the following error appears:
┏ 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)?
┗ ----------------------------
Renderer WDS exited with code 1
Error: Renderer WDS exited with code 1
at ChildProcess.<anonymous> (D:\Projects\Application\node_modules\electron-webpack\src\dev\ChildProcessManager.ts:62:32)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1047:16)
at Socket.<anonymous> (internal/child_process.js:438:11)
at Socket.emit (events.js:314:20)
at Pipe.<anonymous> (net.js:672:12)
It seems like @expo/electron-adapter's webpack configuration is using optimization.namedModules: true option, which is deprecated since v5 & replaced with the optimization.moduleIds: 'named' option.
Description
@expo/electron-adapter
uses Webpack v4 configuration options which were dropped/removed since v5. Henceexpo-electron
doesn't support webpack v5 right now.Expected Behavior
Application using webpack v5 should run with
@expo/electron-adapter
, usingexpo-electron start
commandObserved Behavior
After running
expo-electron start
, the following error appears:It seems like
@expo/electron-adapter
's webpack configuration is usingoptimization.namedModules: true
option, which is deprecated since v5 & replaced with theoptimization.moduleIds: 'named'
option.Environment
Reproducible Demo
expo init
expo-electron start