@@ -7,7 +7,7 @@ var CopyWebpackPlugin = require('copy-webpack-plugin');
77var HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
88
99var ENV = process . env . ENV = process . env . NODE_ENV = 'development' ;
10- var HMR = process . argv . join ( '' ) . indexOf ( ' hot') > - 1 ;
10+ var HMR = helpers . hasProcessFlag ( ' hot') ;
1111
1212var metadata = {
1313 title : 'Angular2 Webpack Starter by @gdi2990 from @AngularClass' ,
@@ -19,28 +19,19 @@ var metadata = {
1919} ;
2020/*
2121 * Config
22+ * with default values at webpack.default.conf
2223 */
23- module . exports = helpers . validate ( {
24+ module . exports = helpers . defaults ( {
2425 // static data for index.html
2526 metadata : metadata ,
26- // for faster builds use 'eval'
27- devtool : 'source-map' ,
28- debug : true ,
29- // cache: false,
27+ // devtool: 'eval' // for faster builds use 'eval'
3028
3129 // our angular app
3230 entry : { 'polyfills' : './src/polyfills.ts' , 'main' : './src/main.ts' } ,
3331
3432 // Config for our build files
3533 output : {
36- path : helpers . root ( 'dist' ) ,
37- filename : '[name].bundle.js' ,
38- sourceMapFilename : '[name].map' ,
39- chunkFilename : '[id].chunk.js'
40- } ,
41-
42- resolve : {
43- extensions : [ '' , '.ts' , '.async.ts' , '.js' ]
34+ path : helpers . root ( 'dist' )
4435 } ,
4536
4637 module : {
@@ -83,20 +74,10 @@ module.exports = helpers.validate({
8374 ] ,
8475
8576 // Other module loader config
86- tslint : {
87- emitErrors : false ,
88- failOnHint : false ,
89- resourcePath : 'src' ,
90- } ,
9177
9278 // our Webpack Development Server config
9379 devServer : {
9480 port : metadata . port ,
95- host : metadata . host ,
96- // contentBase: 'src/',
97- historyApiFallback : true ,
98- watchOptions : { aggregateTimeout : 300 , poll : 1000 }
99- } ,
100- // we need this due to problems with es6-shim
101- node : { global : 'window' , progress : false , crypto : 'empty' , module : false , clearImmediate : false , setImmediate : false }
81+ host : metadata . host
82+ }
10283} ) ;
0 commit comments