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?
-
14-04-2021 - |
Domanda
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);
})();
Soluzione
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.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange