{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/13532","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/13532/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/13532/comments","events_url":"https://api.github.com/repos/angular/angular/issues/13532/events","html_url":"https://github.com/angular/angular/issues/13532","id":196169500,"number":13532,"title":"Rollup fails on rxjs/Subject imported by @angular/core/src/facade/async.js","user":{"login":"linusbrolin","id":3481784,"avatar_url":"https://avatars.githubusercontent.com/u/3481784?v=3","gravatar_id":"","url":"https://api.github.com/users/linusbrolin","html_url":"https://github.com/linusbrolin","followers_url":"https://api.github.com/users/linusbrolin/followers","following_url":"https://api.github.com/users/linusbrolin/following{/other_user}","gists_url":"https://api.github.com/users/linusbrolin/gists{/gist_id}","starred_url":"https://api.github.com/users/linusbrolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linusbrolin/subscriptions","organizations_url":"https://api.github.com/users/linusbrolin/orgs","repos_url":"https://api.github.com/users/linusbrolin/repos","events_url":"https://api.github.com/users/linusbrolin/events{/privacy}","received_events_url":"https://api.github.com/users/linusbrolin/received_events","type":"User","site_admin":false},"labels":[{"id":375501288,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core%20&%20compiler","name":"comp: core & compiler","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-16T22:35:51Z","updated_at":"2016-12-22T15:16:39Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[ x ] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nangular.io [describes](https://angular.io/docs/ts/latest/cookbook/aot-compiler.html) using Rollup for treeshaking and bundling, but Rollup fails with this message:\r\n`Error: 'Subject' is not exported by node_modules\\rxjs\\Subject.js (imported by node_modules\\@angular\\core\\src\\facade\\async.js).`\r\n\r\nSupposedly, the solution is to use the `namedExports` option, but that doesn't make any difference at all...\r\n\r\nMy rollup-config.js looks like this:\r\n```\r\nimport rollup from 'rollup';\r\nimport nodeResolve from 'rollup-plugin-node-resolve';\r\nimport commonjs from 'rollup-plugin-commonjs';\r\nimport uglify from 'rollup-plugin-uglify';\r\n\r\nexport default {\r\n  entry: 'aot/client.aot.js',\r\n  dest: 'dist/build.js', // output a single application bundle\r\n  sourceMap: false,\r\n  format: 'iife',\r\n  plugins: [\r\n    nodeResolve({\r\n      jsnext: true,\r\n      module: true\r\n    }),\r\n    commonjs({\r\n      include: 'node_modules/rxjs/**',\r\n      namedExports: {\r\n        'node_modules/rxjs/Subject.js': [ 'Subject' ]\r\n      }\r\n    }),\r\n    uglify()\r\n  ]\r\n}\r\n```\r\n**Expected behavior**\r\n\r\n\r\n**Minimal reproduction of the problem with instructions**\r\n<!--\r\nIf the current behavior is a bug or you can illustrate your feature request better with an example, \r\nplease provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\r\nhttps://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).\r\n-->\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\n<!-- Describe the motivation or the concrete use case -->\r\n\r\n**Please tell us about your environment:**\r\nOS: Windows 10, IDE: VSCode, package manager: npm\r\n\r\n* **Angular version:** 2.2.4\r\n\r\n* **Browser:** [all]\r\n \r\n* **Language:** [ES2015]\r\n\r\n* **Node (for AoT issues):** `node --version` =   v6.9.2\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/268820302","html_url":"https://github.com/angular/angular/issues/13532#issuecomment-268820302","issue_url":"https://api.github.com/repos/angular/angular/issues/13532","id":268820302,"user":{"login":"linusbrolin","id":3481784,"avatar_url":"https://avatars.githubusercontent.com/u/3481784?v=3","gravatar_id":"","url":"https://api.github.com/users/linusbrolin","html_url":"https://github.com/linusbrolin","followers_url":"https://api.github.com/users/linusbrolin/followers","following_url":"https://api.github.com/users/linusbrolin/following{/other_user}","gists_url":"https://api.github.com/users/linusbrolin/gists{/gist_id}","starred_url":"https://api.github.com/users/linusbrolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linusbrolin/subscriptions","organizations_url":"https://api.github.com/users/linusbrolin/orgs","repos_url":"https://api.github.com/users/linusbrolin/repos","events_url":"https://api.github.com/users/linusbrolin/events{/privacy}","received_events_url":"https://api.github.com/users/linusbrolin/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T15:16:38Z","updated_at":"2016-12-22T15:16:38Z","body":"@schippie yeah, I just found the problem.\r\nIn my project I use a gulpscript for compiling, due to having alot of other assets and libs that should be copied and/or compiled aswell.\r\nHowever, doing the rollup from a gulpscript seems to produce this error. Very weird.\r\n\r\nI posted my gulpscript here: https://github.com/rollup/rollup-plugin-commonjs/issues/137#issuecomment-268030321"}}
{"actor":{"display_login":"linusbrolin"}}