{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/plugin-css/issues/127","repository_url":"https://api.github.com/repos/systemjs/plugin-css","labels_url":"https://api.github.com/repos/systemjs/plugin-css/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/plugin-css/issues/127/comments","events_url":"https://api.github.com/repos/systemjs/plugin-css/issues/127/events","html_url":"https://github.com/systemjs/plugin-css/issues/127","id":217573722,"number":127,"title":"format: esm breaks rollup static optimization","user":{"login":"amenadiel","id":238439,"avatar_url":"https://avatars1.githubusercontent.com/u/238439?v=3","gravatar_id":"","url":"https://api.github.com/users/amenadiel","html_url":"https://github.com/amenadiel","followers_url":"https://api.github.com/users/amenadiel/followers","following_url":"https://api.github.com/users/amenadiel/following{/other_user}","gists_url":"https://api.github.com/users/amenadiel/gists{/gist_id}","starred_url":"https://api.github.com/users/amenadiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amenadiel/subscriptions","organizations_url":"https://api.github.com/users/amenadiel/orgs","repos_url":"https://api.github.com/users/amenadiel/repos","events_url":"https://api.github.com/users/amenadiel/events{/privacy}","received_events_url":"https://api.github.com/users/amenadiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-28T14:12:42Z","updated_at":"2017-03-30T09:36:10Z","closed_at":null,"body":"given a jspm.config.js with meta\r\n\r\n```js\r\n meta: {\r\n    \"*.css\": {\r\n      \"defaultExtension\": false,\r\n      \"format\": \"amd\",\r\n      \"loader\": \"css\"\r\n    }\r\n  }\r\n```\r\n\r\nDoing \r\n\r\n```sh\r\njspm build style.css style.js\r\n```\r\n\r\nWorks fine. And it works fine using `format = \"cjs\"` too. But if I try to use `format = \"esm\"` to take advantage of Rollup static optimization:\r\n\r\n```js\r\n meta: {\r\n    \"*.css\": {\r\n      \"defaultExtension\": false,\r\n      \"format\": \"esm\",\r\n      \"loader\": \"css\"\r\n    }\r\n  }\r\n```\r\n\r\nIt errors with message:\r\n\r\n> Error loading styles/public.css: load hook should return a string, a { code, map } object, or nothing/null\r\n> /my_project/node_modules/rollup/dist/rollup.js:8839:10\r\n\r\nThis is actually the expected result if the build module is actually a function\r\nhttps://github.com/rollup/rollup/blob/d1c1126b1aca6f5b44772b1ddc19b1651dc78928/test/function/load-returns-string-or-null/_config.js\r\n\r\nBut I guess when \"format\":\"esm\", the translated output should be delivered to Rollup in a special way\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/systemjs/plugin-css/issues/comments/290356521","html_url":"https://github.com/systemjs/plugin-css/issues/127#issuecomment-290356521","issue_url":"https://api.github.com/repos/systemjs/plugin-css/issues/127","id":290356521,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars2.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2017-03-30T09:36:10Z","updated_at":"2017-03-30T09:36:10Z","body":"This actually seems to work ok for me. This may have been fixed in the SystemJS builder patch recently, still pending release into jspm. The release should go out later today - if you can try again then, let me know if it seems fixed."}}
{"actor":{"display_login":"guybedford"}}