I am newbie here🙈
So I want to try by using npm instead CDN Gsap. I started to install from windows terminal npm install gsap i ,
After installing I tried to go index.html, removed from script
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script>
then refresh in index.html and it doesn't work! It doesn't animate!
However it works perfect if I call back script in CDN!
Maybe I have to call npm run gsap?
To run native modules in the browser, the script tag has to have a module type on it.
<script type="module">
import { gsap } from "./node_modules/gsap/index.js";
gsap.to(".foo", { x: 200 });
</script>
But I don't want to confuse you with that, because basically nobody does it that way because they use some sort of build tool. I would recommend using snowpack or parcel to get started. With those, you don't have to worry about the script tag, and you can impor