-
-
Notifications
You must be signed in to change notification settings - Fork 78
Events not working for Production builds #15
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
Comments
@alexgoldstone I followed what you explained and could got the same error. It happens only with Gonna close it, but if it persists, feel free to return and reopen the discussion 😸 |
@andrefarzat Thank you for directing me to the link suggesting this is an issue with the Angular build tools. I did search before reporting here but did not find this myself. For anyone experiencing the same issue, I am able to confirm that the events work when the production build is crated using:
Unfortunately this increases my build size by > 30% but at least it works and can be re-optimized later. |
...same here. I got the same error. Thank you for posting this bug and providing a workaround! |
Same here using an OHLC plot when trying to manipulate the range slider in prod mode. Can this be re-opened so the devs are aware please? |
Best solution for me was using |
I faced similar error when I run following command
|
@hpardess looks like it is a problem with angular minifier/optimizer with |
FYI: it looks like it is fixed now (with version 1.2). |
Actually... FYI - 1.2 doesn't work for me at all. The application referencing plotly and angular-plotly 1.2 just shows a blank screen before even drawing charts. Works fine rolling back to 1.1. Sorry, don't see errors to report besides nothing rendering and do not have time to dig into details for now :( |
@enalposi so please, return here once you have a concrete example and reopen this issue if necessary 😺 |
Hi - FYI, just checked 1.3 and same issue. However, I caught an error in the log this time and it mentioned it's not initialized correctly with a link for what to do. Noticed a missing assignment "PlotlyModule.plotlyjs = PlotlyJS;" which didn't bother 1.1 but adding it per instructions fixed 1.3. Thanks guys! |
Angular CLI: 6.2.2
Node: 8.11.3
OS: darwin x64
Angular: 6.1.1
Browser: Google Chromer Version 68.0.3440.106 (Official Build) (64-bit)
My
<plotly-plot>
component contains the following:handleHover
andhandleUnhover
simply console log the event.If I run a development build using
ng serve
then everything functions correctly so it seems that in principle my code is fine.If I create a production build using
ng build --prod
then the charts are still rendered correctly but myhandleHover
andhandleUnhover
functions do not get called and instead I see the following in the browser console:The text was updated successfully, but these errors were encountered: