How can I override this file on my theme?
/vendor/magento/module-ui/view/frontend/web/js/view/messages.js
I'm a newbie to M2
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityHow can I override this file on my theme?
/vendor/magento/module-ui/view/frontend/web/js/view/messages.js
I'm a newbie to M2
In your custom module [Namespace]/[Module]/view/frontend/requirejs-config.js
add this
var config = {
map: {
'*': {
'Magento_Ui/Magento_Ui/js/view/messages.js':'[Namespace]_[Module]/js/view/messages.js'
}
}
};
your overridden js file should be here [Namespace]_[Module]/view/frontend/web/js/view/messages.js
run below command:
php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy -f
read more here: Extending / Overriding JS in Magento 2
var config = { "map": { "*": { "flexslider":'Magento_Theme/js/jquery.flexslider.min', "amShopbyFilterSlider": "js/amShopby" } } };
Do I still need to create folders and file (theme-name/view/frontend/require-config.js)
– thedeadlyone
Oct 29 '18 at 11:01