const path=require("path"); const HtmlWebpackPlugin=require("html-webpack-plugin") module.exports={ entry:{ app:'./src/app.js', main:'./src/main.js' }, output:{ path:path.resolve(__dirname,"dist"), filename:"[name].js"//webpack中的命名方式,【name】以文件名自己命名 }, plugins:[ new HtmlWebpackPlugin({ template:path.resolve(__dirname,"public/index.html") }) ], // plugins: [ // new webpack.LoaderOptionsPlugin({ // // test: /\.xxx$/, // may apply this only for some modules // options: { // Plugins: … // } // }) // ], mode:'production' }
标签:__,app,配置,入口,js,webpack,HtmlWebpackPlugin,path From: https://www.cnblogs.com/xiaobaizitaibai/p/16921207.html