1, modify webpack.dev.conf file webpack.prod.conf file
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
// favicon: './favicon.ico'
favicon: path.resolve('favicon.ico'), //新增
}),
2, will be placed in the root directory ico