单入口文件配置 webpack.config.js const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin');//自动生成html模板,以便在多个入口文件时,不用手动修改引入的js module.exports = { entry: './src/index.js', plugins: [//配置html-webpack-plugin new HtmlWebpackPlugin({…