Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC.8 fails on ng build --prod #1651

Closed
codediodeio opened this issue May 15, 2018 · 1 comment
Closed

RC.8 fails on ng build --prod #1651

codediodeio opened this issue May 15, 2018 · 1 comment

Comments

@codediodeio
Copy link
Contributor

Version info

Angular: 6.0.1
Firebase: 5.0.2
AngularFire: 5.0.0-rc.8.0

How to reproduce these conditions

  1. Follow AngularFire2 setup instructions
  2. Run ng build --prod

Debug output

ERROR in Error during template compile of 'AppModule'
Function calls are not supported in decorators but 'AngularFireModule' was called.

Expected behavior

Build should run successfully.

Actual behavior

Build fails only in production (AOT)

Problem

I don't think the Angular compiler can analyze code dynamically in initializeApp. These lines are the source of the problem

https://github.com/angular/angularfire2/blob/a8414f5d62ec073db760e0b7e9346e4d946bd3a3/src/core/firebase.app.module.ts#L50-L51

Possible Solution?

Require the second arg to initializeApp to be a FirebaseAppConfig object and remove the string union type.

@codediodeio
Copy link
Contributor Author

Just noticed this is a duplicate. Will close for #1635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant