Create a plugin file as follows:

function FileListPlugin (){}

FileListPlugin.prototype.apply = function(compiler) {
    // Compiler represents the environment configuration of WebPack
    // Compilation objects represent a build of a resource version
    compiler.plugin("emit".function (compilation, callback){
        var filelist = "In this build:\n\n";

        for (var filename in compilation.assets){
            filelist += ("-" + filename + "\n");
        }


        compilation.assets["filelist.md"] = {
            source: function(){
                return filelist;
            },
            size: function() {
                returnfilelist.length; }};console.log("pluginA=====")

        callback();
    });
};

module.exports = FileListPlugin;

Copy the code

Configure config in vue Config

  configureWebpack: {
    plugins: [new FileListPlugin()]
  },
Copy the code

This generates files in distThe file content is the file name list