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

Warnings on optimization bailouts when ng serve #2565

Closed
cupidchan opened this issue Aug 6, 2020 · 5 comments
Closed

Warnings on optimization bailouts when ng serve #2565

cupidchan opened this issue Aug 6, 2020 · 5 comments

Comments

@cupidchan
Copy link

Version info

Angular:
10.0.1

Firebase:
8.6.0

AngularFire:
6.0.2

Other (e.g. Ionic/Cordova, Node, browser, operating system):

How to reproduce these conditions

Whenever I try to ng server, i got the following warnings:

WARNING in /Users/cupidchan/Documents/GitHub/pistevo-health/web/node_modules/@angular/fire/ivy_ngcc/fesm2015/angular-fire.js depends on 'firebase/app'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/cupidchan/Documents/GitHub/pistevo-health/web/node_modules/@angular/fire/ivy_ngcc/fesm2015/angular-fire-firestore.js depends on '@firebase/app'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/cupidchan/Documents/GitHub/pistevo-health/web/node_modules/@angular/fire/ivy_ngcc/fesm2015/angular-fire-firestore.js depends on '@firebase/firestore'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/cupidchan/Documents/GitHub/pistevo-health/web/node_modules/@firebase/firestore/dist/index.cjs.js depends on '@firebase/component'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /Users/cupidchan/Documents/GitHub/pistevo-health/web/node_modules/@firebase/firestore/dist/index.cjs.js depends on '@firebase/util'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Steps to set up and reproduce

Sample data and security rules

Debug output

** Errors in the JavaScript console **

** Output from firebase.database().enableLogging(true); **

** Screenshots **

Expected behavior

There shouldn't be a warning of optimization bailout

Actual behavior

Warnings show optimization bailout

@Splaktar
Copy link
Member

Duplicate of #2478 and firebase/firebase-js-sdk#3315.

@jamesdaniels
Copy link
Member

This is fixed in the latest major Firebase release, it will be supported in AF 6.0.4 which will be cut shortly.

@pgg
Copy link

pgg commented Oct 30, 2020

This is fixed in the latest major Firebase release, it will be supported in AF 6.0.4 which will be cut shortly.

in AF 6.0.4: '@angular/fire/firestore'. CommonJS or AMD dependencies can cause optimization bailouts.

@jamesdaniels
Copy link
Member

Not sure why that would be... @angular/fire/firestore like the rest of @angular/fire is compiled by the Angular CLI and most definitely conforms to AFP.

@StephenFluin @mgechev any thoughts? Firebase v8 is modules now, AngularFire is compiled with ng cli and nothing obviously wrong in the package.json. CLI / ngcc is still complaining. 🤷

@StephenFluin
Copy link
Contributor

I'm not seeing these warnings anymore on the latest version of @angular/fire (6.0.4) and Firebase (8.0.1) and Angular (11.0.0-rc.2).

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

5 participants