@@ -11,6 +11,7 @@ var helpers = require('./helpers');
11
11
var CopyWebpackPlugin = require ( 'copy-webpack-plugin' ) ;
12
12
var HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
13
13
var ForkCheckerPlugin = require ( 'awesome-typescript-loader' ) . ForkCheckerPlugin ;
14
+ var WriteFilePlugin = require ( 'write-file-webpack-plugin' ) ;
14
15
15
16
/**
16
17
* Webpack Constants
@@ -237,8 +238,17 @@ module.exports = {
237
238
//
238
239
// See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin
239
240
// NOTE: when adding more properties make sure you include them in custom-typings.d.ts
240
- new webpack . DefinePlugin ( { 'ENV' : JSON . stringify ( METADATA . ENV ) , 'HMR' : HMR } )
241
+ new webpack . DefinePlugin ( { 'ENV' : JSON . stringify ( METADATA . ENV ) , 'HMR' : HMR } ) ,
241
242
243
+ // Plugin: Write File Plugin
244
+ // Description: Write bundle files for debugging.
245
+ // Forces webpack-dev-server program to write bundle files to the file system.
246
+ //
247
+ // For use in conjuction with Visual Code debugger.
248
+ //
249
+ // See: https://github.com/AngularClass/angular2-webpack-starter/issues/297#issuecomment-193989148
250
+ // See: https://github.com/gajus/write-file-webpack-plugin
251
+ new WriteFilePlugin ( )
242
252
] ,
243
253
244
254
// Static analysis linter for TypeScript advanced options configuration
@@ -264,7 +274,8 @@ module.exports = {
264
274
watchOptions : {
265
275
aggregateTimeout : 300 ,
266
276
poll : 1000
267
- }
277
+ } ,
278
+ outputPath : helpers . root ( 'dist' )
268
279
} ,
269
280
270
281
// Include polyfills or mocks for various node stuff
0 commit comments