I know there is already a topic about this, as well as a documentation, but I just can't get it to work:
How can I extend Ui Components' JavaScript in Magento 2?
I'm trying to extend Magento_Ui/js/form/form (located in vendor/magento/module-ui/view/base/web/js/form/form.js).
So I added requirejs-config.js In my modules' view/base-folder:
var config = {
map: {
'*': {
"Magento_Ui/js/form/form": "Vendor_Module/js/form/form"
}
}
};
And in my file base/web/js/form/form.js:
define([
"Magento_Ui/js/form/form"
], function(FormComponent){
"use strict";
/**
* Rewrite original UI Component:
*/
return FormComponent.extend({});
});
But for some reason, FormComponent is not the UI Component I'm trying to extends, but undefined.
According to the documentation, this should work, but it doesn't. So what am I missing here?