Check widgets and build report

0
Hi everyone, I have some widgets in my project. In one widget's module, I require modules from another widget. For example, from widgetB module, i used jquery and a plugin from another widgetA like this: define(["require", "exports", "widgetAName/widget/lib/jqueryDefinitionWidget", "widgetAName/widget/lib/jquery.fancytree-all.min", ...) { "use strict"; ... So, 1. If i click "Check widgets", it said the WidgetB has error. 2. However, I look at "build_webui_bundle_log.txt", there is no error. 3. Then I deployed to acceptance enviroment, and everything works fine. 4. If I remove ""widgetAName/widget/lib/jqueryDefinitionWidget", "widgetAName/widget/lib/jquery.fancytree-all.min", there's no error in "Check widgets", however, I really want to reused those libraries. Is there anyone experience the same errors? or do you have solution for my problem? Is there anyway to refer to another widget's module without causes errors in the check. Best regards,  
asked
2 answers
0

As far as I know the widget mpks are evaluated separately. When you would bundle WidgetA and widgetB in one module, it should work. Like the ChartsJS share a Common.js.

answered
0

My best bet would be to locally run the Modeler with 'bundle widgets' ticked.

This is what Mendix does when generating the MPK files for cloud deployment. Especially this bundling of widgets will cause conflicts when referring to same copies of a (jQuery) library. Maybe that setting will generate an error in one of the log files. Else, also check if your browser gives console errors when running locally with 'bundle widgets' ticked.

answered