-
Notifications
You must be signed in to change notification settings - Fork 142
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
Does't work when bundled with --js-minify #197
Comments
I also know now why the cards from products are not showing up. It's because the category is null. When I clicked on category, it works... it is again because of this:
Thus, when category is null... it doesn't work. I think if I am not mistaken, when polymer build minifies javascript through --js-minifier, it minifies the Polymer library as well, and I think when observing changes in properties, it just makes undefined and null equal to each other. Thus, it doesn't run computed and observer functions when at least one of the parameters are undefined and null because when minified, undefined == null. But that is just a hunch :) |
Hi. Thank you so much for taking your time to investigate thoroughly. Unfortunately though your suggestions did not help me. I will try to compile a minimal reproduction for you to test against. Speaking of which, are you sure you were running on the Anyways, I'm still getting this error stack whever I try to log in..
|
Ohhh. I was running on master. But when I looked at the fc-login-component.html from both branches, it is the same. Can you push it to your repo so I can pull it up to mine and see why my suggestions are not working? Either that or you need to use CTRL + SHIFT + R to do refresh without using the cache. And don't forget to rerun the compiler (I had that problem just now when I was first testing your app, only to find out I didn't compile it hahaha) |
Sure, I just pushed latest changes. In fact something changed and now I'm seeing this same error even in unbundled build. Hell, even in simple |
OIC! It started ocurring in unminified from when I added When minified, I indeed had to additionally apply your solution to overcome the compute problem. Guess I should report it somewhere. Core Polymer repo maybe? And what about lazy-loading? Polymerfire adds about 100KB to the minified bundle. I definitely would prefer it to stay out. Would you like me to prepare a separate example for that issue alone? |
Well polymer --js-minify works better I think for Polymer 2.0 versions. And computed properties work differently in Polymer 2.0 from 1.0. |
@tpluscode I just thought of an idea that might help you on lazy-loading. What I usually do before was that i just add polymerfire up on the core because I really need it to be part of the first content, especially because the content that's needed to be up on screen is from firebase. Then I remember, firebase content, especially the ones that doesn't need any form of authentication (like blog articles, or other things), can be retrieved using ajax calls. So just use iron-ajax instead for critical information or first content, then just lazy load firebase after the first content has been painted. |
Description
When I use polymerfire and try to
polymer build --js-minify
authentication breaksExpected outcome
Should work just like in unbundled form
Actual outcome
When already signed-in, the elements don't authenticate. We use email+password authentication and when we try Chrome console shows
Similar with Firefox
Steps to reproduce
You can reproduce by checking out this branch: https://github.com/PGS-dev/framapp-polymer/tree/lazy-imports and running
Browsers Affected
The text was updated successfully, but these errors were encountered: