celli Posted January 6, 2020 Share Posted January 6, 2020 I can get GSAP3's splitText plugin working fine on CodePen with the CodePen plugin URL https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/SplitText3.min.js I have a Greensock membership, so I have the plugin hosted and local -- but it throws and error, even if I use my hosted plugin URL on CodePen. I tried registering the plugin like this gsap.registerPlugin(SplitTextPlugin); I still get this error on the SplitText.js file : "Uncaught SyntaxError: Cannot use import statement outside a module" Then of course I get the error that SplitText is not defined Any ideas why I am not able to use it outside of codePen ? See the Pen eYmGYZQ by celli (@celli) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted January 6, 2020 Share Posted January 6, 2020 Hey celli. It sounds like you're trying to use the modules version. Try using the UMD version instead. They are meant to be loaded in a browser normally using a <script> tag. 1 Link to comment Share on other sites More sharing options...
celli Posted January 6, 2020 Author Share Posted January 6, 2020 perfect, that worked ! I knew it had to be something simple. I didn't realize that. Thanks! 1 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