用electron-webpack启动项目出错
来源:1-1 学习本课程的收获以及案例展示(内附彩蛋)

慕慕1545788
2021-01-08
用electron-webpack启动项目出错:
warning “electron-webpack > mini-css-extract-plugin@0.9.0” has incorrect peer dependency “webpack@^4.4.0”.
warning “electron-webpack > webpack-cli@3.3.12” has incorrect peer dependency “webpack@4.x.x”.
warning " > electron-webpack@2.8.2" has incorrect peer dependency “webpack@^4.42.1”.
[4/4] Building fresh packages…
success Saved 1 new dependency.
info Direct dependencies
└─ electron-webpack@2.8.2
info All dependencies
└─ electron-webpack@2.8.2
Done in 6.43s.
D:\Software\electron_projects\demo_yarn2.1\demo_yarn>yarn start
yarn run v1.22.10
$ electron-webpack dev
┏ Renderer -------------------
AttachConsole failed with error 6: �������
┗ ----------------------------
ValidationError: 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)?
这个是webpack版本不匹配造成的么,该如何解决呢?
1回答
-
张轩
2021-01-08
同学你好 你使用的这个 electron-webpack 项目的 github 地址是什么 发我一下 我看看
022021-01-09
相似问题