Webpack “什么是”呢;“相同文件名错误”;网页包?

Webpack “什么是”呢;“相同文件名错误”;网页包?,webpack,config,Webpack,Config,当ı运行webpack生产模式“多个资产向同一文件名index.html发送不同内容”时,我遇到了这个错误,但ı不理解。看起来ı没有添加多个index.html输出。这是我的webpack.config.js文件。此外,ı可以使用react const HtmlWebpackPlugin = require("html-webpack-plugin"); const path = require("path"); const MiniCssExtractP

当ı运行webpack生产模式“多个资产向同一文件名index.html发送不同内容”时,我遇到了这个错误,但ı不理解。看起来ı没有添加多个index.html输出。这是我的webpack.config.js文件。此外,ı可以使用react

const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

module.exports = {
  output: {
    path: path.join(__dirname, "/dist"),
    filename: "index.bundle.js",
    publicPath: "/",
  },
  devServer: {
    port: 3010,
    watchContentBase: true,
  },
  entry: ["@babel/polyfill", "./src/index.js"],
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /node_modules/,
        use: {
          loader: "babel-loader",
        },
      },
      {
        test: /\.scss$/,
        use: [
          {
            loader: "style-loader",
          },
          {
            loader: "css-loader",
          },
          {
            loader: "sass-loader",
          },
        ],
      },
      {
        test: /\.(png|jpg)$/,
        loader: "url-loader",
      },
    ],
  },
  devServer: {
    historyApiFallback: true,
  },
  plugins: [
    new MiniCssExtractPlugin(),
    new HtmlWebpackPlugin(),
  ],
};

编辑:当ıremove HtmlWebpackPlugin时,此错误被销毁。这个插件有什么问题