I have a website that includes several third-party js modules via a tag script. I need to add lodashor underscorefor my code, but if I just add it from the CDN as follows:
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
then poorly written libraries die from a terrible death, because they expect it to _be something else. I know that lodash/ underscorehas something called "no conflict" that requires jscode to execute :
var lodash = _.noConflict();
But this code needs to be executed somewhere, and it is very difficult for me to ensure its execution before all poorly written libraries. This is an easy way to enable lodashnoconflict already, so I donβt have to look for a safe place to enable noconflict manually how lodash.min.noconflict.js?
source
share