alenny / angular2-adal-example

MIT License
22 stars 10 forks source link

Prod build fails with webpack + ng4 #11

Closed hiraldesai closed 7 years ago

hiraldesai commented 7 years ago

Hi,

I am trying to integrate this package with a brand new Angular 2 app (using "@angular/core": "^4.1.2" in package.json). I'm using webpack to do the build instead of SystemJs.

Local dev build with ng build and ng serve is working fine but prod build with ng build --prod --aot fails with the following error.

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/src/di.d.ts, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/src/core.d.ts, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/index.d.ts, resolving symbol BrowserXhr in
c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/http/src/backends/browser_xhr.d.ts, resolving symbol BrowserXhr in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/http/src/backends/browser_xhr.d.ts

Is this because the package is built using older Angular version? Is there a way I can get around it or fix it?

hiraldesai commented 7 years ago

I just realized this is the wrong package. I meant to raise this in https://github.com/ranveeraggarwal/ng2-adal-QuickStart