It is strongly recommended not to change the source code of default Magento components including JS files. However, owing to the business requirements you are bound to go out of the way and override js file in magento 2 the default function.
Here, I have posted the code to override JS file in Magento 2. You may use this code when you want to extend the default JS file to extend a default Magento 2 feature at https://meetanshi.com/blog/override-js-file-in-magento-2/
No comments:
Write comments