{"action":"created","issue":{"url":"https://api.github.com/repos/janpaepke/ScrollMagic/issues/324","repository_url":"https://api.github.com/repos/janpaepke/ScrollMagic","labels_url":"https://api.github.com/repos/janpaepke/ScrollMagic/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/janpaepke/ScrollMagic/issues/324/comments","events_url":"https://api.github.com/repos/janpaepke/ScrollMagic/issues/324/events","html_url":"https://github.com/janpaepke/ScrollMagic/issues/324","id":79365950,"number":324,"title":"NPM issue","user":{"login":"omago","id":3735598,"avatar_url":"https://avatars0.githubusercontent.com/u/3735598?v=4","gravatar_id":"","url":"https://api.github.com/users/omago","html_url":"https://github.com/omago","followers_url":"https://api.github.com/users/omago/followers","following_url":"https://api.github.com/users/omago/following{/other_user}","gists_url":"https://api.github.com/users/omago/gists{/gist_id}","starred_url":"https://api.github.com/users/omago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omago/subscriptions","organizations_url":"https://api.github.com/users/omago/orgs","repos_url":"https://api.github.com/users/omago/repos","events_url":"https://api.github.com/users/omago/events{/privacy}","received_events_url":"https://api.github.com/users/omago/received_events","type":"User","site_admin":false},"labels":[{"id":57608418,"url":"https://api.github.com/repos/janpaepke/ScrollMagic/labels/support","name":"support","color":"cc317c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2015-05-22T09:04:01Z","updated_at":"2018-04-19T02:37:57Z","closed_at":"2015-05-24T17:19:36Z","author_association":"NONE","body":"Hi Jan,\n\nMy question is not directly related to ScrollMagic. My code has grown and i decided to use npm, gulp, webpack for frontend. \n\nOn top of my file i have:\n\n``` js\nvar $ = require(\"jquery\");\nvar ScrollMagic = require(\"scrollmagic\");\nvar gsap = require(\"gsap\");\n```\n\nI am getting following errors in my console:\n\n```\n11:02:35:546 (ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.jsScrollMagic._util.U.log @ script.min.js:13048\nscript.min.js:13048 \n11:02:35:550 (ScrollMagic.Scene) -> ERROR calling addIndicators() due to missing Plugin 'debug.addIndicators'. Please make sure to include plugins/debug.addIndicators.js\n```\n\nHow can i require a plugin?\n"},"comment":{"url":"https://api.github.com/repos/janpaepke/ScrollMagic/issues/comments/382591182","html_url":"https://github.com/janpaepke/ScrollMagic/issues/324#issuecomment-382591182","issue_url":"https://api.github.com/repos/janpaepke/ScrollMagic/issues/324","id":382591182,"user":{"login":"denisinla","id":345318,"avatar_url":"https://avatars1.githubusercontent.com/u/345318?v=4","gravatar_id":"","url":"https://api.github.com/users/denisinla","html_url":"https://github.com/denisinla","followers_url":"https://api.github.com/users/denisinla/followers","following_url":"https://api.github.com/users/denisinla/following{/other_user}","gists_url":"https://api.github.com/users/denisinla/gists{/gist_id}","starred_url":"https://api.github.com/users/denisinla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisinla/subscriptions","organizations_url":"https://api.github.com/users/denisinla/orgs","repos_url":"https://api.github.com/users/denisinla/repos","events_url":"https://api.github.com/users/denisinla/events{/privacy}","received_events_url":"https://api.github.com/users/denisinla/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T02:37:57Z","updated_at":"2018-04-19T02:37:57Z","author_association":"NONE","body":"For Webpack4 the below got it all working for me.\r\n\r\n_The below uses [resolve.modules](https://webpack.js.org/configuration/resolve/#resolve-modules)_\r\n```javascript\r\n///webpack.config.js\r\nresolve: {\r\n    modules: ['node_modules'],\r\n    alias: {\r\n      'TweenLite': 'gsap/src/minified/TweenLite.min.js',\r\n      'TweenMax': 'gsap/src/minified/TweenMax.min.js',\r\n      'TimelineLite': 'gsap/src/minified/TimelineLite.min.js',\r\n      'TimelineMax': 'gsap/src/minified/TimelineMax.min.js',\r\n      'ScrollMagic': 'scrollmagic/scrollmagic/minified/ScrollMagic.min.js',\r\n      'animation.gsap': 'scrollmagic/scrollmagic/minified/plugins/animation.gsap.min.js',\r\n      'debug.addIndicators': 'scrollmagic/scrollmagic/minified/plugins/debug.addIndicators.min.js'\r\n    }\r\n  }\r\n```\r\n_Import TweenMax prior to ScrollMagic_\r\n```javascript\r\n// app.js\r\nimport TweenMax from 'TweenMax';\r\nimport ScrollMagic from 'ScrollMagic';\r\nimport 'animation.gsap';\r\nimport 'debug.addIndicators';\r\n```\r\n"}}
{"actor":{"display_login":"denisinla"}}