gianpesto
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by gianpesto
-
-
Hej!
due to our workflow i came across the following problem:
i want to load gsap via cdn but import a paid plugin as module.
Is a mix between both even possible?
so i would have
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.6/gsap.min.js"></script>
in my markup, and
import { DrawSVGPlugin } from '@/js/vendors/gsap/plugins/DrawSVGPlugin';
(@ is just an alias to my src-dir).
anyway it seems i can't get this to work. 😱
How to activate draw SVG plugin?
in GSAP
Posted
So for anyone running across the same problem as i had (my sight was much clearer after lunch), this is the solution:
Follow the instructions as written in the docs
that is, download the zip, place the gsap-bonus.tgz file in your project root, install it with:
and in your frontend:
(or whatever plugin you're in need of).
so this will include the plugins and gsap in your bundle. if you want to use the gsap from the cdn instead, you need to include it first in a script tag:
and in your webpack-config:
this will tell webpack not to include gsap in your bundle as it will be served from outside.
🎡🙌🏼🤪☄️🍕 gsapaliciouuuus