Question about bundling list
Closed this issue · 3 comments
Tjitse-E commented
Hi,
Thanks a lot for this module, so far it works great for us!
I've one question about the 'Include in bundling' list. How are we supposed to use this script? What's the PATH_TO_JS in a Magento 2 instance?
globalSrc = '';
jQuery('script').each(function(){
if (!jQuery(this).attr('src')) return;
var src = jQuery(this).attr('src');
if (src.indexOf('https://' + window.location.hostname) != -1 || src.indexOf('http://' + window.location.hostname) != -1) {
var src = (src.replace(PATH_TO_JS, ''));
globalSrc += "\n" + src;
}
})
console.log(globalSrc);
Thanks again.
magefan commented
Hello @Tjitse-E , thank you for your message regarding our Magento Rocket JavaScript / Deferred JavaScript Extension.
PATH_TO_JS - you need to replace it with a string of static content URL including language. E.g.
'https://domain.com/pub/static/version1549034518/frontend/Magento/luma/en_US/'
We have also updated read me file 8dc99a4
Please let us know if it help.