Hi,
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?
Here is the code for both
’
{% require_js %}
<script src=“https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js” integrity=“sha512-H6cPm97FAsgIKmlBA4s774vqoN24V5gSQL4yBTDOY2su2DeXZVhQPxFK4P6GPdnZqM9fg1G3cMv5wD7e6cFLZQ==” crossorigin=“anonymous” referrerpolicy=“no-referrer”></script>
<script src=“https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/Flip.min.js” integrity=“sha512-aW9AOex6eTI5fwQAtEuIAd7wHW0xgm/OzRnw5+UZ49RMCRKIyEdf2SLoxQ4STMx0NoX9wIBXLlruAog9ZTzrSQ==” crossorigin=“anonymous” referrerpolicy=“no-referrer”></script>
{% end_require_js %}
’
and this is in the modules js
gsap.registerPlugin(Flip);
…
const state = Flip.getState(activeItem);
Flip.from(state, {
duration: 0.5s,
absolute: true,
});
…
