var config={ entry:{b:”./src/main.js”,a:”./src/a.js”}, output:{ path:__dirname+’./dist’, filename:'[name]-[hash:5]-[chunk]-min.js’, } }; module.exports=config;

Explain in detail

If you want to package multiple files, use an object, where [name] is a,b, and 2 in the attribute name. The path to output should be __dirname and set to absolute path 3. Output filename [name] is the name before js, for example main.js,main is the name in [name]. [hash] is the hash value output when packaging, and [hash:5] is the first five bits of the hash value. [Chunk] words are not recognized in the new version of Webpack and are written as they are