@@ -25,17 +25,18 @@ var BannerPlugin = webpack.BannerPlugin;
2525var config = {
2626 devtool : 'source-map' ,
2727 // devtool: 'eval',
28-
28+ watch : true ,
2929 debug : true ,
3030 cache : true ,
3131 // our Development Server configs
32- devServer : {
32+ /* devServer: {
3333 inline: true,
3434 colors: true,
3535 historyApiFallback: true,
3636 contentBase: 'src/public',
37- publicPath : '/__build__'
38- } ,
37+ publicPath: '/__build__',
38+ hot: true
39+ },*/
3940
4041 //
4142 entry : {
@@ -44,27 +45,24 @@ var config = {
4445 'zone.js' ,
4546 'reflect-metadata' ,
4647 'rtts_assert/rtts_assert' ,
47- 'angular2/angular2'
48+ 'angular2/angular2'
4849 ] ,
4950 'app' : [
5051 // App
51-
52- /*
53- * include any 3rd party js lib here
54- */
55-
52+ 'webpack-dev-server/client?http://localhost:8080' ,
53+ 'webpack/hot/dev-server' ,
5654 './src/app/bootstrap'
5755 ]
5856 } ,
5957
6058 // Config for our build files
6159 output : {
6260 path : root ( '__build__' ) ,
63- filename : '[name] .js' ,
61+ filename : 'app .js' ,
6462 // filename: '[name].[hash].js',
65- sourceMapFilename : '[name] .js.map' ,
66- chunkFilename : '[id].chunk.js'
67- // publicPath: 'http://mycdn.com /'
63+ sourceMapFilename : 'app .js.map' ,
64+ chunkFilename : '[id].chunk.js' ,
65+ publicPath : '/__build__ /'
6866 } ,
6967
7068 resolve : {
@@ -129,8 +127,6 @@ var config = {
129127 / r t t s _ a s s e r t \/ s r c \/ r t t s _ a s s e r t /
130128 ]
131129 } ,
132-
133- // plugins: plugins, // see below
134130 context : __dirname ,
135131 stats : {
136132 colors : true ,
@@ -180,9 +176,9 @@ var environment_plugins = {
180176 } )
181177 ] ,
182178
183- development : [
179+ development : [
184180 /* Dev Plugin */
185- // new webpack.HotModuleReplacementPlugin(),
181+ new webpack . HotModuleReplacementPlugin ( ) ,
186182 ]
187183
188184 } //env
@@ -203,6 +199,7 @@ var combine_common_chunks = commons_chunks_plugins.map(function (config) {
203199 return new CommonsChunkPlugin ( config ) ;
204200} ) ;
205201
202+ console . log ( 'NODE_ENV' , NODE_ENV ) ;
206203// conbine everything
207204config . plugins = [ ] . concat ( combine_common_chunks , environment_plugins . all , environment_plugins [ NODE_ENV ] ) ;
208205
0 commit comments