These are chat archives for AngularClass/angular2-webpack-starter

Jan 2017
Jan 06 2017 19:36
my vscode goes crazy on webpack configs in config directory, did anyone else see this before:
Screen Shot 2017-01-06 at 11.34.08 AM.png
Dave Bosley
Jan 06 2017 20:37

Hey all, I'm having an issue using the @angularclass/hmr-loader with atl. I'm basing my own config on the angular2 webpack starter project. the error I'm getting in my own project is this:

ERROR in ./client/angular/polyfills.ts
Module build failed: TypeError: Cannot read property 'replace' of undefined
    at Object.Angular2HMRLoader (C:\projectDir\node_modules\@angularclass\hmr-loader\index.js:31:18)
 @ multi polyfills

I'm using identical dependencies as the angular2-webpack-starter. My source files, configs, and webpack outputs are slightly different, but otherwise the config is identical.
The error happens for any webpack entry I define, even an empty .ts file
I debugged into webpack and found the root cause is that at this specific line in atl,
emitResult.sourceMap and emitResult.text are undefined. This does not happen in the angular2-webpack-starter project, but it does in my own. I've been bashing my head against it for 2 or 3 hours now and haven't found any solution.

Dave Bosley
Jan 06 2017 21:08
Figured it out.... the folder was ./Client, not ./client....