此时执行 npm run build
控制台提示报错
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
编辑 webpakc.config.js
再次执行 npm run build 在浏览器查看dist 目录下的index.html可以看到颜色已经变成红色了.