mirror of https://github.com/webpack/webpack.git
				
				
				
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			563 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			563 B
		
	
	
	
		
			JavaScript
		
	
	
	
| var path = require("path");
 | |
| var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
 | |
| 
 | |
| module.exports = {
 | |
| 	mode: "production",
 | |
| 	entry: {
 | |
| 		vendor: ["./vendor1", "./vendor2"],
 | |
| 		pageA: "./pageA",
 | |
| 		pageB: "./pageB",
 | |
| 		pageC: "./pageC"
 | |
| 		// older versions of webpack may require an empty entry point declaration here
 | |
| 		// common: []
 | |
| 	},
 | |
| 	output: {
 | |
| 		path: path.join(__dirname, "js"),
 | |
| 		filename: "[name].js"
 | |
| 	},
 | |
| 	plugins: [
 | |
| 		new CommonsChunkPlugin({
 | |
| 			// The order of this array matters
 | |
| 			names: ["common", "vendor"],
 | |
| 			minChunks: 2
 | |
| 		})
 | |
| 	]
 | |
| };
 |