0

I am trying to override magento 2 core js '

require-config.js file at path Test/JsOverride/view/frontend/

   var config = {
        "map": {
            "*": {
                "menu": "Test_JsOverride/js/menu-custom"
            }

        }
    };

Test/JsOverride/view/frontend/web/js

menu-custom.js

define([ 'jquery', 'jquery/ui', 'mage/menu' 
    ], function($){
    $.widget('inchoo.menu', $.mage.menu, {
        _init: function () {
            alert("I'm Inchoo");
        },
        toggle: function () {
            alert("I'm Inchoo");
        } }); return $.inchoo.menu; })
  • Did you run static content deploy? – Sukumar Gorai Jun 17 at 13:40
  • Yes, I have run deploy – Paras Arora Jun 17 at 13:43
  • Can you check pub/static/frontend/[vendor]/[theme]/en_US/Test_Override/js/menu-custom.js? – Sukumar Gorai Jun 17 at 13:44
  • I found the file over there . – Paras Arora Jun 17 at 13:47
  • must be permission issue. or check .htaccess under static – Sukumar Gorai Jun 17 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.