using webpack to generate a distribution version in ./lib/dist.js
This commit is contained in:
		
							
								
								
									
										2
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								index.js
									
									
									
									
									
								
							@@ -8,4 +8,4 @@
 | 
				
			|||||||
 * library is heavy on number of files so it could have negative impact on load time
 | 
					 * library is heavy on number of files so it could have negative impact on load time
 | 
				
			||||||
 * we need a compiled (single file) version of the library
 | 
					 * we need a compiled (single file) version of the library
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
module.exports = require('./src/client.js');
 | 
					module.exports = require('./lib/dist.js');
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4878
									
								
								lib/dist.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4878
									
								
								lib/dist.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										14
									
								
								webpack.config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								webpack.config.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					module.exports = {
 | 
				
			||||||
 | 
					  entry: "./src/client.js",
 | 
				
			||||||
 | 
					  target: "node",
 | 
				
			||||||
 | 
					  output: {
 | 
				
			||||||
 | 
					    filename: "./lib/dist.js",
 | 
				
			||||||
 | 
					    libraryTarget: "commonjs2"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  externals: [
 | 
				
			||||||
 | 
					    /^[^\.]/,
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "../messages/clientMessage": "../src/messages/clientMessage"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
		Reference in New Issue
	
	Block a user