{"action":"created","issue":{"url":"https://api.github.com/repos/cyclejs/cyclejs/issues/740","repository_url":"https://api.github.com/repos/cyclejs/cyclejs","labels_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/740/labels{/name}","comments_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/740/comments","events_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/740/events","html_url":"https://github.com/cyclejs/cyclejs/issues/740","id":273153010,"node_id":"MDU6SXNzdWUyNzMxNTMwMTA=","number":740,"title":"Update the cjs/mjs packaging","user":{"login":"mightyiam","id":635591,"node_id":"MDQ6VXNlcjYzNTU5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/635591?v=4","gravatar_id":"","url":"https://api.github.com/users/mightyiam","html_url":"https://github.com/mightyiam","followers_url":"https://api.github.com/users/mightyiam/followers","following_url":"https://api.github.com/users/mightyiam/following{/other_user}","gists_url":"https://api.github.com/users/mightyiam/gists{/gist_id}","starred_url":"https://api.github.com/users/mightyiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightyiam/subscriptions","organizations_url":"https://api.github.com/users/mightyiam/orgs","repos_url":"https://api.github.com/users/mightyiam/repos","events_url":"https://api.github.com/users/mightyiam/events{/privacy}","received_events_url":"https://api.github.com/users/mightyiam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-11T15:29:19Z","updated_at":"2018-08-20T15:10:24Z","closed_at":"2018-08-20T15:10:24Z","author_association":"NONE","body":"Currently, we package both CommonJS and ES modules.\r\n\r\nThe way we do it is out-of-date.\r\n\r\nWe transpile twice:\r\n\r\n1. to `lib/cjs`\r\n1. to `lib/mjs`\r\n\r\nAnd we specify a `module` field in `package.json`.\r\n\r\nTo be up-to-date with the proposal, we should:\r\n\r\n1. Transpile twice into `lib`.\r\n   1. ES modules with `.mjs` extension\r\n   2. CommonJS with `.js` extension\r\n2. Remove the `package.json` `module` field.\r\n3. Set the `package.json` `main` field to `./lib/index` (no extension).\r\n\r\nRegarding the `.mjs` extension: there is [no support for that in TypeScript](https://github.com/Microsoft/TypeScript/issues/18442). So, we'd have to set up renaming, it seems.\r\n\r\nhttps://github.com/nodejs/node-eps/blob/6eef91d4ab4544ee5ed01df86dd7d055e90e130e/002-es-modules.md#44-shipping-both-esm-and-cjs"},"comment":{"url":"https://api.github.com/repos/cyclejs/cyclejs/issues/comments/414351599","html_url":"https://github.com/cyclejs/cyclejs/issues/740#issuecomment-414351599","issue_url":"https://api.github.com/repos/cyclejs/cyclejs/issues/740","id":414351599,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDM1MTU5OQ==","user":{"login":"jvanbruegge","id":1529052,"node_id":"MDQ6VXNlcjE1MjkwNTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1529052?v=4","gravatar_id":"","url":"https://api.github.com/users/jvanbruegge","html_url":"https://github.com/jvanbruegge","followers_url":"https://api.github.com/users/jvanbruegge/followers","following_url":"https://api.github.com/users/jvanbruegge/following{/other_user}","gists_url":"https://api.github.com/users/jvanbruegge/gists{/gist_id}","starred_url":"https://api.github.com/users/jvanbruegge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvanbruegge/subscriptions","organizations_url":"https://api.github.com/users/jvanbruegge/orgs","repos_url":"https://api.github.com/users/jvanbruegge/repos","events_url":"https://api.github.com/users/jvanbruegge/events{/privacy}","received_events_url":"https://api.github.com/users/jvanbruegge/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T15:10:24Z","updated_at":"2018-08-20T15:10:24Z","author_association":"MEMBER","body":"Closing this because mjs is mostly for nodejs. For frontend bundlers using the `module` field in the package.json is still the preferred way"}}
{"actor":{"display_login":"jvanbruegge"}}