{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/16","repository_url":"https://api.github.com/repos/driftyco/ionic-app-scripts","labels_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/16/comments","events_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/16/events","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/16","id":178316336,"number":16,"title":"Using CommonJS modules with rollup","user":{"login":"shlomiassaf","id":5377501,"avatar_url":"https://avatars.githubusercontent.com/u/5377501?v=3","gravatar_id":"","url":"https://api.github.com/users/shlomiassaf","html_url":"https://github.com/shlomiassaf","followers_url":"https://api.github.com/users/shlomiassaf/followers","following_url":"https://api.github.com/users/shlomiassaf/following{/other_user}","gists_url":"https://api.github.com/users/shlomiassaf/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomiassaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomiassaf/subscriptions","organizations_url":"https://api.github.com/users/shlomiassaf/orgs","repos_url":"https://api.github.com/users/shlomiassaf/repos","events_url":"https://api.github.com/users/shlomiassaf/events{/privacy}","received_events_url":"https://api.github.com/users/shlomiassaf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"danbucholtz","id":4680488,"avatar_url":"https://avatars.githubusercontent.com/u/4680488?v=3","gravatar_id":"","url":"https://api.github.com/users/danbucholtz","html_url":"https://github.com/danbucholtz","followers_url":"https://api.github.com/users/danbucholtz/followers","following_url":"https://api.github.com/users/danbucholtz/following{/other_user}","gists_url":"https://api.github.com/users/danbucholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/danbucholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbucholtz/subscriptions","organizations_url":"https://api.github.com/users/danbucholtz/orgs","repos_url":"https://api.github.com/users/danbucholtz/repos","events_url":"https://api.github.com/users/danbucholtz/events{/privacy}","received_events_url":"https://api.github.com/users/danbucholtz/received_events","type":"User","site_admin":false},"assignees":[{"login":"danbucholtz","id":4680488,"avatar_url":"https://avatars.githubusercontent.com/u/4680488?v=3","gravatar_id":"","url":"https://api.github.com/users/danbucholtz","html_url":"https://github.com/danbucholtz","followers_url":"https://api.github.com/users/danbucholtz/followers","following_url":"https://api.github.com/users/danbucholtz/following{/other_user}","gists_url":"https://api.github.com/users/danbucholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/danbucholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbucholtz/subscriptions","organizations_url":"https://api.github.com/users/danbucholtz/orgs","repos_url":"https://api.github.com/users/danbucholtz/repos","events_url":"https://api.github.com/users/danbucholtz/events{/privacy}","received_events_url":"https://api.github.com/users/danbucholtz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":81,"created_at":"2016-09-21T11:12:37Z","updated_at":"2016-10-16T21:15:18Z","closed_at":"2016-10-05T19:46:13Z","body":"@adamdbradley I think you closed #3 in a rush.\r\n\r\nangularfire2 and firebase are something you can't ignore when thinking ionic...\r\n\r\nIt's also not specific to them, it's a problem when using rollup, I think the rollup process needs to handle commonJS directories transparently.\r\n\r\nI now have another, similar error with `lodash`\r\n\r\nWhen I:\r\n```\r\nimport { assign } from 'lodash';\r\n```\r\n\r\nI get: \r\n```\r\n[14:02:04]  bundle failed:  Error: Module /app/node_modules/lodash/lodash.js does not export assign (imported by /app/.tmp/data-source/some.service.js)\r\n```\r\n\r\nAgain, there is a workaround but ionic developer shouldn't get hard time on simple tasks:\r\n```\r\nimport assign from 'lodash/assign';\r\n```\r\nThis is not perfect, there is a TS error:\r\n```\r\n[14:14:40]  src/data-source/feeding.service.ts(5,8): error TS1192: Module '\"lodash/assign\"' has no default export.\r\n```\r\n\r\n> There's a switch in error between the 2, when TS is happy rollup isn't and vice versa.\r\n\r\nBTW, rollup does a wired thing when doing: \r\n```\r\nimport * as assign from 'lodash/assign';\r\n```\r\n\r\n`assign` will be the module, with a `default` property which is the assign function...\r\n\r\n```\r\nerror_handler.js:45 EXCEPTION: Error in ./HomePage class HomePage - inline template:17:10 caused by: assign$2 is not a function\r\n```\r\n\r\nI know you considered #3 as someone else's problem but `app-scripts` is part of the ionic CLI and if the integration is not smooth you'll get ton's of complaints.\r\nIf you integrate `rollup` you need it to be transparent."},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/comments/254075494","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/16#issuecomment-254075494","issue_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/16","id":254075494,"user":{"login":"m0n01i7h","id":4782787,"avatar_url":"https://avatars.githubusercontent.com/u/4782787?v=3","gravatar_id":"","url":"https://api.github.com/users/m0n01i7h","html_url":"https://github.com/m0n01i7h","followers_url":"https://api.github.com/users/m0n01i7h/followers","following_url":"https://api.github.com/users/m0n01i7h/following{/other_user}","gists_url":"https://api.github.com/users/m0n01i7h/gists{/gist_id}","starred_url":"https://api.github.com/users/m0n01i7h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m0n01i7h/subscriptions","organizations_url":"https://api.github.com/users/m0n01i7h/orgs","repos_url":"https://api.github.com/users/m0n01i7h/repos","events_url":"https://api.github.com/users/m0n01i7h/events{/privacy}","received_events_url":"https://api.github.com/users/m0n01i7h/received_events","type":"User","site_admin":false},"created_at":"2016-10-16T21:15:18Z","updated_at":"2016-10-16T21:15:18Z","body":"I have same issues.\r\n\r\nIonic bundles succesfully in case of 'out of the box' but customizing is painful.\r\nI found not documented `--dev`  flag which only ables development build for `ionic run`.\r\n\r\nRollup still has lot of issues with external libraries. I cannot understand why it was choosen.\r\n\r\nI tried to use webpack with Ionic2RC1 in my project.\r\n- ts-loader just stuck at 49% \r\n- awesome-typescript-loader built Ionic with a lot of errors. Result build was unrunnable.\r\n\r\nI even tried to build Ionic2 from sources but I've met runtime error\r\n`Uncaught Error: Can't resolve all parameters for provideLocationStrategy: (PlatformLocation, ?, Config).`\r\n\r\n#### Few words about performance.\r\nWebpack has code-splitting and CommonChuncks plugin which significaly improve development performance. \r\ne.g\r\n~700ms watch-rebuild for Webpack\r\n~7s watch-rebuild for Rollup"}}
{"actor":{"display_login":"m0n01i7h"}}