{"action":"created","issue":{"url":"https://api.github.com/repos/zingchart/zingtouch/issues/36","repository_url":"https://api.github.com/repos/zingchart/zingtouch","labels_url":"https://api.github.com/repos/zingchart/zingtouch/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/zingchart/zingtouch/issues/36/comments","events_url":"https://api.github.com/repos/zingchart/zingtouch/issues/36/events","html_url":"https://github.com/zingchart/zingtouch/pull/36","id":303982467,"number":36,"title":"Add Server Side Rendering Support","user":{"login":"wagoid","id":7467450,"avatar_url":"https://avatars1.githubusercontent.com/u/7467450?v=4","gravatar_id":"","url":"https://api.github.com/users/wagoid","html_url":"https://github.com/wagoid","followers_url":"https://api.github.com/users/wagoid/followers","following_url":"https://api.github.com/users/wagoid/following{/other_user}","gists_url":"https://api.github.com/users/wagoid/gists{/gist_id}","starred_url":"https://api.github.com/users/wagoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagoid/subscriptions","organizations_url":"https://api.github.com/users/wagoid/orgs","repos_url":"https://api.github.com/users/wagoid/repos","events_url":"https://api.github.com/users/wagoid/events{/privacy}","received_events_url":"https://api.github.com/users/wagoid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-09T21:15:18Z","updated_at":"2018-03-26T20:20:39Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/zingchart/zingtouch/pulls/36","html_url":"https://github.com/zingchart/zingtouch/pull/36","diff_url":"https://github.com/zingchart/zingtouch/pull/36.diff","patch_url":"https://github.com/zingchart/zingtouch/pull/36.patch"},"body":"When using the library in an app that uses Server Side Rendering, it breaks, since it tries to add ZingTouch to the window, and window doesn't exist in Node.js.\r\nTo fix it, I added UMD support to the webpack config file.\r\n\r\nSome people could be using your library like this:\r\n```\r\n// index.js\r\nimport 'ZingTouch'\r\n\r\n// another-file.js\r\nZingTouch.Region() //Calling ZingTouch before importing it\r\n```\r\n\r\nBecause of that, I kept defining ZingTouch to window every time it's available, to make the change backwards compatible."},"comment":{"url":"https://api.github.com/repos/zingchart/zingtouch/issues/comments/376298584","html_url":"https://github.com/zingchart/zingtouch/pull/36#issuecomment-376298584","issue_url":"https://api.github.com/repos/zingchart/zingtouch/issues/36","id":376298584,"user":{"login":"mike-schultz","id":3509165,"avatar_url":"https://avatars0.githubusercontent.com/u/3509165?v=4","gravatar_id":"","url":"https://api.github.com/users/mike-schultz","html_url":"https://github.com/mike-schultz","followers_url":"https://api.github.com/users/mike-schultz/followers","following_url":"https://api.github.com/users/mike-schultz/following{/other_user}","gists_url":"https://api.github.com/users/mike-schultz/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-schultz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-schultz/subscriptions","organizations_url":"https://api.github.com/users/mike-schultz/orgs","repos_url":"https://api.github.com/users/mike-schultz/repos","events_url":"https://api.github.com/users/mike-schultz/events{/privacy}","received_events_url":"https://api.github.com/users/mike-schultz/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T20:20:39Z","updated_at":"2018-03-26T20:20:39Z","author_association":"CONTRIBUTOR","body":"@wagoid Thanks for the contribution. I tried out the changes, and it looks like setting the build to 'umd' encapsulates the rest of the properties in a default property, causing the library to break. If we ommitted umd and just kept the window check, would that suffice?"}}
{"actor":{"display_login":"mike-schultz"}}