webpack-cli bugs All In One
Error: Cannot find module 'webpack-cli/bin/config-yargs'
❌ webpack version bug
"devDependencies": {
"clean-webpack-plugin": "^3.0.0",
"html-webpack-plugin": "^4.5.0",
"ts-loader": "^8.0.7",
"typescript": "^4.0.3",
"webpack": "^5.2.0",
"webpack-cli": "^4.1.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.2.0"
}
✅
"devDependencies": {
"clean-webpack-plugin": "^3.0.0",
"html-webpack-plugin": "^4.3.0",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
}
版本不兼容,降级处理
https://gist.github.com/xgqfrms/a908b1c60272aa0f772396956526b2c2
refs
https://github.com/webpack/webpack-dev-server/issues/2029
https://github.com/webpack/webpack-dev-server/issues/2759
https://github.com/webpack/webpack-dev-server/issues/2424
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!