1、全局安装webpack-cli yarn global add webpack-cli 2、本地安装webpack、webpack-cli yarn add -D webpack webpack-cli 3、执行 webpack-cli 转载于:https://www.cnblogs.com/karry990921/p/8981363.html