Closed jffry closed 8 years ago
When angular2-hmr is used on the client-side (as it is in https://github.com/AngularClass/angular2-webpack-starter), the code looking for process in https://github.com/gdi2290/angular2-hmr/blob/75ec097/src/hmr-decorator.ts#L5 causes an exception to be thrown in the browser:
angular2-hmr
process
Uncaught ReferenceError: process is not defined (hmr-decorator.ts:5)
This is causing this issue: https://github.com/AngularClass/angular2-webpack-starter/issues/491
The check for process could be pretty easily be made to fail gracefully if process is not defined, for example:
const _env = typeof process !== 'undefined' && (process && process.env && process.env.ENV || process.env.NODE_ENV);
thanks! done via https://github.com/gdi2290/angular2-hmr/commit/55bdee0d9799430d3d244195a50d31514f4d13cb
When
angular2-hmr
is used on the client-side (as it is in https://github.com/AngularClass/angular2-webpack-starter), the code looking forprocess
in https://github.com/gdi2290/angular2-hmr/blob/75ec097/src/hmr-decorator.ts#L5 causes an exception to be thrown in the browser:This is causing this issue: https://github.com/AngularClass/angular2-webpack-starter/issues/491
The check for
process
could be pretty easily be made to fail gracefully ifprocess
is not defined, for example: