Magento 2.3.4 Advanced JS Bundling: Should a `deps` node entry within a `shim` node be copied into `deps` module in the build.js file?

magento.stackexchange https://magento.stackexchange.com/questions/315267

문제

My store's requirejs-config.js has an entry for shim node as seen in the code snippet below, that includes an entry for deps node as well. I wonder if I should copy this deps node entry to the corresponding deps node although it is originally a part of shim node.

(function() {
var config = {
    shim: {
        'Swissup_Pagespeed/js/lib/loadCSS': {
            exports: 'loadCSS'
        },
        'Swissup_Pagespeed/js/lib/cssrelpreload': {
            deps: [
                'Swissup_Pagespeed/js/lib/loadCSS'
            ]
        }
    },
    deps: [
        'jquery/jquery.cookie'
    ]
};

require.config(config);
})();
도움이 되었습니까?

해결책

Anything that is found within a particular configuration shouldn't be copied into another node whose name resembles with the entries within another as my example shows.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top