cancel
Showing results for 
Search instead for 
Did you mean: 

require js is conflicting with an external js that uses another js lib

   Did you know you can see the translated content as per your choice?

require js is conflicting with an external js that uses another js lib

Hi, everyone !
require js is conflicting with an external js that uses another js library (choices.js)
I put this script at magento panel Html header: <script type="text/javascript" src="https://d335luupugsy2.cloudfront.net/js/loader-scripts/977cbedf-9ebf-4c62-a60f-389cec8edd22-loader.j..."></script> so it load a whatsapp icon at homepage who I'm using for get some leads (marketing stuff)
how can I resolve this conflict? i'm using magento 2.4.1 open source... i have deleted requirejs path from theme at production mode just for testing, and pop-up icon from external script load well at my e-commerce.

I think if have a way to put requirejs at last of all on bottom of page.. but I dont know how do it or if it is a solution. may someone help me, please ?

1 REPLY 1

Re: require js is conflicting with an external js that uses another js lib

My/Module/view/frontend/requirejs-config.js

var config = {
map: {
"*": {
"catalogAddToCart": "Magento_Catalog/js/catalog-add-to-cart"
}
}
};

 

Please keep one thing in mind: Modules are loaded before design, so if any requirejs-config.js you mentioned is located in the DESIGN folder, you will need to apply a requirejs-config.js change in design.

If issue solved, Click Kudos & Accept as Solution.
LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool