var htmlWebpackPlugin = require('html-webpack-plugin');

// declare /dist to be an absolute path
module.exports = {
  // Module parsing
  module: {},
  / / the plugin
  plugins: [
    new htmlWebpackPlugin({
      filename: path.resolve(DIST_PATH, 'index.html'), // Is the name of the HTML file. The default is index.html
      title: 'title'.template: path.resolve(__dirname, 'index.html'), // Specify which HTML file template your generated file will depend on. The template type can be HTML, JADE, EJS, etc
      inject: true.//true body head false true default, The body script tag is located at the bottom of the body of the HTML file. The head script tag is located in the head of the HTML file. False Does not insert the generated JS file
      hash: true.favicon: path.resolve(__dirname, './fav.ico'), 
       
      
      minify: true.// Whether to compress HTML
      cache:true.// The default is true, meaning that a new file is generated when the content changes
      showErrors:true.// When webPack reports an error, it wraps the error message in a pre. Default is true
      chunks:chunks, // Chunks are mainly used for multi-entry files. If you have multiple entry files, you can compile and generate multiple packaged files, and then the chunks can choose which js files you want to use.
      excludeChunks: ' '.// Remove some js}})],Copy the code