You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this library along with SmartGWT but core.js included in this version is making a mess. Newer versions works fine.
But unfortunately core.js is hard-coded in library and I cannot load without it because of resources used in onModuleLoad(). So everything brakes down when I just add inherits in xml.
So I've a suggestion.
Remove entry-points from XMLs. They are not actually execute and they only enforce inclusion off all TextResources. You still need to manually call injectJs methods so there is no benefit of this.
So when I just add inherits to my project XML code is automatically larger of 1MB (AmCharts base code) even if it's not called. When you remove those entry-points TextResources (ex.core.js) are only included to compiled code when they are actually used.
Other benefits:
You can then manually load those libraries in different way on demand when they are actually needed - it's very useful in large applications.
You can load core.js and others from html script tags and upgrade those files not needed to wait until library gets upgraded.
I would also move them to another module to be more clear about it.
Best regards
The text was updated successfully, but these errors were encountered:
Investigating this further. Problem with SmartGWT integration was loading order. For some reason AmCharts core.js must be loaded before SmartGWT core libraries. That's why it cannot be called in Java code. I will investigate this further.
For now to make it all work I've only deleted entry-point in GwtMaterialAmCore.gwt.xml
since there is already GwtMaterialAmChartsBase.gwt.xml without one.
And also thanks to that I can use latest AmChart with your jsinterop library.
I'm trying to use this library along with SmartGWT but core.js included in this version is making a mess. Newer versions works fine.
But unfortunately core.js is hard-coded in library and I cannot load without it because of resources used in onModuleLoad(). So everything brakes down when I just add inherits in xml.
So I've a suggestion.
Remove entry-points from XMLs. They are not actually execute and they only enforce inclusion off all TextResources. You still need to manually call injectJs methods so there is no benefit of this.
So when I just add inherits to my project XML code is automatically larger of 1MB (AmCharts base code) even if it's not called. When you remove those entry-points TextResources (ex.core.js) are only included to compiled code when they are actually used.
Other benefits:
I would also move them to another module to be more clear about it.
Best regards
The text was updated successfully, but these errors were encountered: