I want to create a mixin for js/modal/confirm.js
but that widget returns some javascript to make it possible to create an instance of the widget instead of the widget itself.
So it returns this
// vendor/magento/module-ui/view/base/web/js/modal/confirm.js
...
return function (config) {
return $('<div></div>').html(config.content).confirm(config);
};
});
instead of
// vendor/magento/module-ui/view/base/web/js/modal/confirm.js
...
return $.mage.confirm;
});