解决办法 如果你的 html-webpack-plugin 版本与 webpack 版本不一致,将 html-webpack-plugin 先 remove ,再 install 跟 webpack 一样的版本。