Share Posted October 11, 2016 Hey guys, I'm having trouble trying to import scrollToPlugin via webpack. This is the error I'm getting - Error in ./~/gsap/src/uncompressed/plugins/ScrollToPlugin.js Module not found: 'TweenLite' I've read in other posts that you modify the webpack.config file to resolve this however I'm using create-react-app and don't have access to the config file. Does anyone know a way around this? Link to comment Share on other sites More sharing options...
Share Posted October 13, 2016 Hm, that's odd that you don't have access to the config file, but I can think of two other options: Just use a <script> tag for the GSAP-related stuff. You could load the files from the CDN and get the benefits of caching too. -OR- delete the 4th line from the bottom of ScrollToPlugin where it says require("../TweenLite.js"); Do either of those work for you? Link to comment Share on other sites More sharing options...
Author Share Posted October 14, 2016 I used the CDN method, thanks for the advice. 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