as the title says, I'm trying to you an external CDN (cdnjs) to import gsap into a module and use it in the js. Ive tried using requier js tags and adding it in the modules html but that doesn't seem to work. Is there any fix for this or is it just not possible to import?
You're using require_js correctly. If you view page source you'll see it there in the footer. Your issue is that by putting the rest of the code in the module js it's being executed before your libraries are loaded, check your console you'll see it says gsap is not defined.
Put it all in the require_js and you should be good. The gsap not defined error goes away.
You're using require_js correctly. If you view page source you'll see it there in the footer. Your issue is that by putting the rest of the code in the module js it's being executed before your libraries are loaded, check your console you'll see it says gsap is not defined.
Put it all in the require_js and you should be good. The gsap not defined error goes away.
Aa thank you that fixes it yes. Is there any other way to do this, it doesn't seem like good practice ti have a lot of js code inside the html file or is this the only way to solve this in hubspot