1. webpack的配置文件中有个配置项:
new HtmlWebpackPlugin({
favicon: 'favicon.ico',
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
看看你是不是配置不太对?
2. 看看你自己有没有index.html