seven Posted July 9, 2021 Share Posted July 9, 2021 Hi, How do I register plugins in next? I try the way from sandbox, also tried in useEffect, but all i get is error: SyntaxError: Cannot use import statement outside a module This error happened while generating the page. Any console logs will be displayed in the terminal window. https://codesandbox.io/s/admiring-wave-gjjhj?file=/src/CommingSoon.js edit: in the console I have strange import like it was trying to import somethinf from my files which is not there import { emojiSafeSplit, getText, splitInnerHTML } from "./utils/strings.js"; Thanks! Link to comment Share on other sites More sharing options...
Solution elegantseagulls Posted July 9, 2021 Solution Share Posted July 9, 2021 In next.js you'll likely want to import the TextPlugin via import { TextPlugin } from "gsap/dist/TextPlugin"; 3 Link to comment Share on other sites More sharing options...
seven Posted July 9, 2021 Author Share Posted July 9, 2021 Hi Elegantseagulls thanks it works! Is a SplitText plugin a different story? I am unable to import it in this same fashion. Thanks! 1 Link to comment Share on other sites More sharing options...
OSUblake Posted July 9, 2021 Share Posted July 9, 2021 SplitText is a paid plugin, so it's not include with the normal package. 2 Link to comment Share on other sites More sharing options...
seven Posted July 9, 2021 Author Share Posted July 9, 2021 I understand, thank you OSUblake! 2 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