Open justinbhopper opened 4 years ago
I believe this might also be the reason html-webpack-plugin no longer works with electron-webpack:
npm init
npm i html-webpack-plugin@latest
npm i electron-webpack@latest
Output from the last command above:
C:\sandbox\bar>npm i electron-webpack@latest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: webpack@5.23.0
npm ERR! node_modules/webpack
npm ERR! peer webpack@"^5.20.0" from html-webpack-plugin@5.2.0
npm ERR! node_modules/html-webpack-plugin
npm ERR! html-webpack-plugin@"^5.2.0" from the root project
npm ERR! peer webpack@"^5.1.0" from terser-webpack-plugin@5.1.1
npm ERR! node_modules/terser-webpack-plugin
npm ERR! terser-webpack-plugin@"^5.1.1" from webpack@5.23.0
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! electron-webpack@"2.8.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@4.46.0
npm ERR! node_modules/webpack
npm ERR! peer webpack@"^4.42.1" from electron-webpack@2.8.2
npm ERR! node_modules/electron-webpack
npm ERR! electron-webpack@"2.8.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\xxxxxxx\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\xxxxxxx\AppData\Local\npm-cache\_logs\2021-02-19T23_52_05_295Z-debug.log
Currently the peer dependency listed for
electron-webpack-ts
is"typescript": "^3.8.3"
, which gives a warning in Yarn:Unless there are any known conflicts, I think the peer dependency should be updated to allow TypeScript >= 4 as well.
E.g.
"typescript": "^3.8.3 || ^4.0.0"