Webpack multi-page reference DllReferencePlugin has a page that does not require dll, and does not introduce dll.js error reporting how to deal with it?

1. Introduce the generated vendor_library into plugins

new webpack.DllReferencePlugin({
    context: __dirname,
      manifest: require("./dll/vendor-manifest.json"),
      name: "vendor_library",
      sourceType : "vendor_library"
})

2, webpack needs to generate multiple pages

//dll
["Admin","Class"].forEach(function(name) {
     webpackConfig.entry[name] = "./src/"+name+"/index";
     const plugin = new HtmlWebpackPlugin({
        filename: name + ".html",
        template: "./public/index.html",
        inject: true,
        chunks: [name],
      });
      webpackConfig.plugins.push(plugin);
})

//dll
webpackConfig.entry["classroom"] = "./src/Classroom/index";
webpackConfig.plugins.push(
    new HtmlWebpackPlugin({
        filename: "classroom.html",
        template: "ejs-render-loader!./src/Classroom/tpl/index.ejs",
        inject: true,
        chunks: ["classroom"]
    })
);

3, related templates

Admin.htmlClass.html
scriptdll: <script src="/js/vendor.dll.js"></script>


./src/Classroom/tpl/index.ejs
dll
 vendor_library is not definded

4, expected results

 classroom  dll
DllReferencePlugin  chunks ["Admin","Class"],

Mar.23,2021

how is the problem solved


seeking the answer to this question


how is the problem solved

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5cfaf-456ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5cfaf-456ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?