{"action":"created","issue":{"url":"https://api.github.com/repos/metafizzy/infinite-scroll/issues/814","repository_url":"https://api.github.com/repos/metafizzy/infinite-scroll","labels_url":"https://api.github.com/repos/metafizzy/infinite-scroll/issues/814/labels{/name}","comments_url":"https://api.github.com/repos/metafizzy/infinite-scroll/issues/814/comments","events_url":"https://api.github.com/repos/metafizzy/infinite-scroll/issues/814/events","html_url":"https://github.com/metafizzy/infinite-scroll/issues/814","id":342577350,"node_id":"MDU6SXNzdWUzNDI1NzczNTA=","number":814,"title":"Using infiniteScroll via NPM","user":{"login":"imfaisalkh","id":10553273,"node_id":"MDQ6VXNlcjEwNTUzMjcz","avatar_url":"https://avatars2.githubusercontent.com/u/10553273?v=4","gravatar_id":"","url":"https://api.github.com/users/imfaisalkh","html_url":"https://github.com/imfaisalkh","followers_url":"https://api.github.com/users/imfaisalkh/followers","following_url":"https://api.github.com/users/imfaisalkh/following{/other_user}","gists_url":"https://api.github.com/users/imfaisalkh/gists{/gist_id}","starred_url":"https://api.github.com/users/imfaisalkh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imfaisalkh/subscriptions","organizations_url":"https://api.github.com/users/imfaisalkh/orgs","repos_url":"https://api.github.com/users/imfaisalkh/repos","events_url":"https://api.github.com/users/imfaisalkh/events{/privacy}","received_events_url":"https://api.github.com/users/imfaisalkh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-19T04:45:21Z","updated_at":"2018-07-25T19:21:06Z","closed_at":"2018-07-25T19:21:06Z","author_association":"NONE","body":"I've installed this script using npm on my installation like this: `npm install infinite-scroll`. Now, in my javascript file i'm using this script like this:\r\n\r\n```\r\nimport infiniteScroll from 'infinite-scroll'\r\n\r\n$('.posts-grid').infiniteScroll({\r\n   append: '.type-post',\r\n   path: '#load-more a',\r\n});\r\n```\r\n\r\nThe issue is, when I run the compiled (using `babelify`) js code this code throws the following error in the browser: `TypeError: e.infiniteScroll is not a function`\r\n\r\nCan you please tell what could be the issue here?"},"comment":{"url":"https://api.github.com/repos/metafizzy/infinite-scroll/issues/comments/407866329","html_url":"https://github.com/metafizzy/infinite-scroll/issues/814#issuecomment-407866329","issue_url":"https://api.github.com/repos/metafizzy/infinite-scroll/issues/814","id":407866329,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzg2NjMyOQ==","user":{"login":"desandro","id":85566,"node_id":"MDQ6VXNlcjg1NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/85566?v=4","gravatar_id":"","url":"https://api.github.com/users/desandro","html_url":"https://github.com/desandro","followers_url":"https://api.github.com/users/desandro/followers","following_url":"https://api.github.com/users/desandro/following{/other_user}","gists_url":"https://api.github.com/users/desandro/gists{/gist_id}","starred_url":"https://api.github.com/users/desandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desandro/subscriptions","organizations_url":"https://api.github.com/users/desandro/orgs","repos_url":"https://api.github.com/users/desandro/repos","events_url":"https://api.github.com/users/desandro/events{/privacy}","received_events_url":"https://api.github.com/users/desandro/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T19:21:06Z","updated_at":"2018-07-25T19:21:06Z","author_association":"MEMBER","body":"[See **To use Infinite Scroll as a jQuery plugin, you need to call jQuery Bridget.**](https://infinite-scroll.com/extras.html#webpack-browserify)\r\n\r\n``` js\r\n// main.js\r\nvar $ = require('jquery');\r\nvar jQueryBridget = require('jquery-bridget');\r\nvar InfiniteScroll = require('infinite-scroll');\r\n\r\n// make Infinite Scroll a jQuery plugin\r\njQueryBridget( 'infiniteScroll', InfiniteScroll, $ );\r\n// now you can use $().infiniteScroll()\r\n$('.container').infiniteScroll({...});\r\n\r\n```\r\n\r\n"}}
{"actor":{"display_login":"desandro"}}