Closed
Description
Hi,
I'm looking for a way to overwrite a javascript method in Magento_Checkout/js/payment/default
, I'm able to extend it with my own My_Module/js/payment/default
and use it without problem, but I need to change every define
that is calling it directly by Magento_Checkout
.
Is there a way to make requirejs understand that I want to change the file it should lookup? Back in Magento 1 the concept was different, but it was possible to overwrite a JS class method using prototypes, this new structure does not allow it or I'm missing something?
Devdocs say about extending a component (which works when changing the define function) or overwriting a widget, but that one does not work with components.
Thanks!