mirror of https://github.com/webpack/webpack.git
				
				
				
			
		
			
				
	
	
		
			25 lines
		
	
	
		
			498 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			498 B
		
	
	
	
		
			JavaScript
		
	
	
	
var path = require("path");
 | 
						|
var webpack = require("../../");
 | 
						|
module.exports = {
 | 
						|
	mode: "production",
 | 
						|
	entry: {
 | 
						|
		main: "./example",
 | 
						|
		common: ["./vendor"] // optional
 | 
						|
	},
 | 
						|
	output: {
 | 
						|
		path: path.join(__dirname, "js"),
 | 
						|
		filename: "[name].chunkhash.js",
 | 
						|
		chunkFilename: "[chunkhash].js"
 | 
						|
	},
 | 
						|
	plugins: [
 | 
						|
		new webpack.optimize.CommonsChunkPlugin({
 | 
						|
			names: ["common", "manifest"]
 | 
						|
		})
 | 
						|
		/* without the "common" chunk:
 | 
						|
		new webpack.optimize.CommonsChunkPlugin({
 | 
						|
			name: "manifest"
 | 
						|
		})
 | 
						|
		*/
 | 
						|
	]
 | 
						|
};
 |