麦进斗magentoRequireJs回调失败

我曾在requirejs-config.js以下

var config = {
    "map": {
        "*": {
            "jquery/easing": "./js/jquery.easing.1.3",
            "jquery/mobile/customized": "./js/jquery.mobile.customized.min",
            "camera": "./js/camera.min"
        }
    },
    "shim": {
        "jquery/easing": ['jquery'],
        "jquery/mobile/customized": ['jquery'],
        "camera": ['jquery', 'jquery/easing', 'jquery/mobile/customized']
        }
    }
};

而在一座座以下代码:

require(['jquery', 'jquery/easing', 'jquery/mobile/customized', 'camera'], function(jQuery) {
    console.log('test');
});

该js文件被加载,但回调函数不会被调用。我是否需要做进一步的修改到JS文件要与RequireJs兼容?

你可以尝试通过启用Magento的开发模式?如果不是你的Magento root身份运行此命令php bin/magento deploy:mode:set developer

原文地址:https://www.cnblogs.com/magento-maijindou/p/5974051.html