text: /**
   * @description MPA webpack 配置
   * @author 双越老师
   */
  
  const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = {
    mode: 'production',
    // 多入口
    entry: {
      home: './src/home/index.js',
      product: './src/product/index.js',
      about: './src/about/index.js'
    },
    output: {
      filename: 'js/[name].[contentHash].js', // name 即 entry 的 key
      path: path.resolve(__dirname, './dist')
    },
    plugins: [
      // 三个页面
      new HtmlWebpackPlugin({
        title: '首页',
        template: './template/index.html',
        filename: 'home.html',
        chunks: ['home']
      }),
      new HtmlWebpackPlugin({
        title: '产品',
        template: './template/product.html',
        filename: 'product.html',
        chunks: ['product']
      }),
      new HtmlWebpackPlugin({
        title: '关于',
        template: './template/about.html',
        filename: 'about.html',
        chunks: ['about']
      })
    ]
  }