Widgets in Mx 5.21 and UMD

3
When I migrate a widget to 5.21 that seems to use a UMD loader pattern it fails to load without any error message. What is a valid way to load it for this Mendix version? Second question: It looks like Mendix 5.18+ is parsing widget code, is that correct and if yes, why? The pattern is (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD define(['jquery'], factory); } else if (typeof exports === 'object') { // Node, CommonJS-like module.exports = factory(require('jquery')); } else { // Browser globals (root is window) root.returnExports = factory(root.jQuery); } }(this, function ($) { // methods function myFunc(){}; // exposed public method return myFunc; })); Edit 1: found solution bootstrap rte widget, patch the define..... define(['BootstrapRTE/lib/jquery'], factory);
asked
1 answers
2

Chris, your solution in the edit is correct. Is there a particular widget from Mendix that doesn't work? Can you elaborate on your second question? Don't know what you mean by that.

answered