skiller Posted November 18, 2023 Share Posted November 18, 2023 Hey there, I'm developing a small, but media-heavy web application (a GSAP powered interactive game), and since I'm bound to tight restrictions regarding file size, I'm using Vite to 1.) write slick and modern module-based code (ESM, or ECMAScript Modules is the keyword here) and to 2.) tightly pack my code. Naturally, I want to provide GSAP as an external dependency (did I mention tight file size restrictions?), but I can't find an ESM-suited CDN link for GSAP and the Premium modules (how I'll be able to use these premium modules without exposing my personal license is a wholly different enchilada). Are there any? I have scoured the https://cdn.jsdelivr.net/npm/gsap@3.12.2/dist/ directory a little, but these all seem to be "normal" (i.e. require- instead of import-based) CommonJS libs. Thanks in advance C. P.S.: I can't provide a CodePen illustrating the problem because referring to GSAP works differently there (via the require syntax). Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted November 18, 2023 Solution Share Posted November 18, 2023 Hi, You can try using skypack for the import as shown in this thread: Hopefully this helps Happy Tweening! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now