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

9th
Sep 2016
JeanPaul Attard
@jeanpaulattard
Sep 09 2016 08:34
@rjlee7 I've managed to identify the issue to lazy loading of routes. Since the Angular Router has built in support for SystemJS, following the specified ways in the guide meant that the routes were attempting to be lazy loaded using SystemJs.
In fact, there's a note in the routing guide, that webpack users must identify an alternative solution, using the webpack way of module loading.
That solution is for Webpack1. Webpack2 has a much neater way using System.import https://gist.github.com/sokra/27b24881210b56bbaff7#code-splitting-with-es6
Sekib Omazic
@SekibOmazic
Sep 09 2016 10:35

Hi there,
I keep getting following error when running npm run:build:

94% asset optimizationError in bail mode: [default] /Users/sekibomazic/Documents/projects/angular2/angular2-webpack-starter/node_modules/@types/hammerjs/index.d.ts:9:4 
Duplicate identifier 'export='.

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "run" "build:prod"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 build:prod: `webpack --config config/webpack.prod.js  --progress --profile --bail`
npm ERR! Exit status 1

Can someone help?

99% Cocoa
@rjlee7
Sep 09 2016 14:16
@jeanpaulattard ah i was using webpack2 and still getting the same error (something wrong with webpack not picking up my reflect-metadata in vendor.ts), but good to know about the issue