These are chat archives for AngularClass/angular2-webpack-starter
An Angular 2 Webpack Starter kit featuring Angular 2, Router, TypeScript, and Webpack by AngularClass
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.