| 
									
										
										
										
											2017-01-31 22:31:55 +00:00
										 |  |  | // #docregion
 | 
					
						
							|  |  |  | var webpack = require('webpack'); | 
					
						
							|  |  |  | var helpers = require('./helpers'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = { | 
					
						
							|  |  |  |   devtool: 'inline-source-map', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   resolve: { | 
					
						
							|  |  |  |     extensions: ['.ts', '.js'] | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   module: { | 
					
						
							|  |  |  |     rules: [ | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         test: /\.ts$/, | 
					
						
							| 
									
										
										
										
											2017-03-27 16:08:53 +01:00
										 |  |  |         loaders: [ | 
					
						
							|  |  |  |           { | 
					
						
							|  |  |  |             loader: 'awesome-typescript-loader', | 
					
						
							|  |  |  |             options: { configFileName: helpers.root('src', 'tsconfig.json') } | 
					
						
							|  |  |  |           } , 'angular2-template-loader' | 
					
						
							|  |  |  |         ] | 
					
						
							| 
									
										
										
										
											2017-01-31 22:31:55 +00:00
										 |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         test: /\.html$/, | 
					
						
							|  |  |  |         loader: 'html-loader' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/, | 
					
						
							|  |  |  |         loader: 'null-loader' | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         test: /\.css$/, | 
					
						
							|  |  |  |         exclude: helpers.root('src', 'app'), | 
					
						
							|  |  |  |         loader: 'null-loader' | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         test: /\.css$/, | 
					
						
							|  |  |  |         include: helpers.root('src', 'app'), | 
					
						
							|  |  |  |         loader: 'raw-loader' | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ] | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   plugins: [ | 
					
						
							|  |  |  |     new webpack.ContextReplacementPlugin( | 
					
						
							|  |  |  |       // The (\\|\/) piece accounts for path separators in *nix and Windows
 | 
					
						
							| 
									
										
										
										
											2017-05-10 13:32:49 +02:00
										 |  |  |       /angular(\\|\/)core(\\|\/)@angular/, | 
					
						
							| 
									
										
										
										
											2017-01-31 22:31:55 +00:00
										 |  |  |       helpers.root('./src'), // location of your src
 | 
					
						
							|  |  |  |       {} // a map of your routes
 | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  |   ] | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // #enddocregion
 |